var arguments = process.argv.splice(2);
var param1 = arguments[0];
// console.log('param1:', param1)

//将字符串转化为json
const str2json = function(srcStr) {
	let json = JSON.parse(srcStr); // (new Function("return " + srcStr))(); // eval('(' + srcStr + ')'); // 
	return json;
}

//-----------------------------------------------------------------------------------------------------
//获取json长度
const getJsonLength = function (jsonData) {
    //return Object.keys(jsonData).length;
    var jsonLength = 0;
    for (var item in jsonData) {
        jsonLength++;
    }
    return jsonLength;
}

//获取类型
const getType = function (data, relData) {
    if (data == 0) {
        return "填空";
    } else if (data == 1) {
        return "文本框";
    } else if (data == 2) {
        return "单选";
    } else if (data == 3) {
        return "下拉选项";
    } else if (data == 4) {
        return "多选";
    } else if (data == 5) {
        return "量表";
    } else if (data == 6) {//新添加标题和说明
        return "占位题";
    } else if (data == 7) {//矩阵选择：单选or多选
        if (0 == relData[0][11][0]) {
            return "矩阵单选";
        } else if (1 == relData[0][11][0]) {
            return "矩阵多选";
        } else {
            return "未知矩阵";
        }
    } else if (data == 8) {//小节，用于分节or分页
        return "占位题";
    } else if (data == 9) {//日期
        return "填空";
    } else if (data == 10) {//时间
        return "填空";
    } else if (data == 11) {//图片
        return "占位题";
    } else if (data == 12) {//视频
        return "占位题";
    } else if (data == 13) {
        return "上传文件";
    } else {
        return "未知";
    }
}

//清洗文本：去除可能存在的下划线_
const cleanText = function (text) {
    let tmp = text.replace(/_/g, "");
    tmp = tmp.trim();//仅去除首尾空格 // tmp = tmp.replace(/\s/gim, "");//去除所有空白
    return tmp;
}

//获取选项
const getOption = function (type, optData, preTitle) {
    let inner = new Array();
    let data = optData[0][1];
    let answerId = optData[0][0];
    // let lineTopic = optData[0][3][0];
    if ("单选" == type || "多选" == type || "下拉选项" == type || "量表" == type) {
        for (let i = 0; i < data.length; i++) {
            let tmpObj = new Object();
            tmpObj.title = cleanText(data[i][0]);
            if ("" == tmpObj.title) {
                tmpObj.title = "其他|underline";
                tmpObj.optionId = answerId + ":其他";
            } else {
                tmpObj.optionId = answerId + ":" + tmpObj.title;//没有选项id,这里用“答案ID:选项字符串”
            }
            tmpObj.value = -1;
            inner.push(tmpObj);
        }
    }
    if ("矩阵单选" == type || "矩阵多选" == type) {
        for (let k = 0; k < optData.length; k++) {
            let curAnswerId = optData[k][0];
            for (let i = 0; i < data.length; i++) {
                let tmpObj = new Object();
                const val = i + 1;
                tmpObj.title = optData[k][3][0] + "_" + data[i][0];//preTitle + "_" + val;//格式：行名_列名（google问卷无列ID）
                tmpObj.optionId = curAnswerId + "_" + data[i][0] + "_" + val; //格式：答案ID_列名_序号（google问卷无列ID）
                tmpObj.value = val;
                inner.push(tmpObj);
            }
        }
    }
    if ("填空" == type || "文本框" == type || "上传文件" == type) {//经过商定：通过构造到optionId将answerId植入
        let tmpObj = new Object();
        tmpObj.title = "";
        tmpObj.optionId = answerId;
        tmpObj.value = -1;
        inner.push(tmpObj);
    }
    return inner;
}

//是否必选: 0否； 1是
const getRequired = function (data) {
    if (1 == data) {
        return true;
    } else {//值为0
        return false;
    }
}

//设置跳转数据（如果存在的话）
const setJumpIfExist = function (tmp, optionData, answerId) {
    if ("单选" == tmp.type || "多选" == tmp.type || "下拉选项" == tmp.type) {
        let jumpData = new Array();
        for (let i = 0; i < optionData.length; i++) {
            let optName = cleanText(optionData[i][0]); //选项名称
            if ("" == optName) {
                optName = "其他";
            }
            if (null != optionData[i][2] && 0 < optionData[i][2]) {
                tmp.hasJump = true;
                let jmpObj = new Object();
                jmpObj.destId = optionData[i][2]; // 跳转的id。跳到结束赋值-1或0
                jmpObj.optionId = answerId + ":" + optName;   // 选中选项id，选中才跳转。这里用其"answerId:选项名称"代替
                jumpData.push(jmpObj);
            } else if (0 > optionData[i][2]) {//继续到下一节“-2”（属于正常流程） 或者 跳至结束“-3”
                if (-3 == optionData[i][2]) {// 跳至结束
                    tmp.hasJump = true;
                    let jmpObj = new Object();
                    jmpObj.destId = -1;
                    jmpObj.optionId = answerId + ":" + optName;// 选中选项id，选中才跳转。这里用其"answerId:选项名称"代替
                    jumpData.push(jmpObj);
                }
            }
        }
        if (tmp.hasJump) {
            tmp.jumpData = jumpData;
        }
    }
}

//针对多选数量有限制的（比如最多选几个）添加到range
const getRangeIfExist = function (data) {
    let range = null;
    if (null != data[4]) {
        let num = parseInt(data[4][0][2][0]);
        if (200 == data[4][0][1]) {//至少
            range = {
                minvalue: num,
                maxvalue: data[1].length
            };
        } else if (201 == data[4][0][1]) {//最多
            range = {
                minvalue: 1,
                maxvalue: num
            };
        } else {// if(204 == data[4][0][1]) {//刚好
            range = {
                minvalue: num,
                maxvalue: num
            };
        }
    } else { //未做任何设置，按最小为1，最大为选项个数算
        range = {
            minvalue: 1,
            maxvalue: data[1].length
        };
    }
    return range;
}

//添加收集电子邮件地址
const addCollectEmail = function (dataArray, srcHtml, counter) {
    let tmp = new Object();
    tmp.srcType = srcHtml; //题目原始类型
    tmp.pageId = 0; // 页码ID
    tmp.id = counter; // 全局题号 ，从1开始递增。 
    tmp.qid = 'emailAddress';// 题目id（提交使用的ID）。这里是固定的字符串且前面不用加·
    tmp.title = '电子邮件地址 *'; // 题目标题，需要避免使用特殊字符“_”
    tmp.type = '填空';  // 见typeName 定义 返回字符串
    tmp.isRequired = true; // 是否必选。
    tmp.inner = [];
    tmp.hasJump = false;
    tmp.jumpData = null;
    tmp.range = null;
    tmp.relation = ''; //赋值关联项;见关联字符串定义(显示逻辑)
    dataArray.push(tmp);
}

// 获取系统类型
const traslateType = function (type, srcType) {
    if ("单选" == type) {
        return "SINGLE";
    } else if ("多选" == type) {
        return "MULTIPLE";
    } else if ("下拉选项" == type) {
        return "SINGLE_SELECT";
    } else if ("排序选择" == type) {
        return "SORTED";
    } else if ("量表" == type) {
        return "SCALE";
    } else if ("矩阵单选" == type | "矩阵量表" == type) {
        return "MATRIX";
    } else if ("矩阵多选" == type) {
        return "MULTIPLE_MATRIX";
    } else if ("滑动条" == type) {
        return "SINGLE_SLIDE";
    } else if ("矩阵滑动" == type) {
        return "SLIDE";
    } else if ("比重" == type) {
        return "RATE";
    } else if ("填空" == type) {
        // if (9 == srcType) {//日期题
        //     return "DATE";
        // } else {
        return "TEXT";
    } else if ("矩阵填空" == type) {
        return "MATRIX_TEXT";
    } else if ("占位题" == type) {
        return "DESCRIPTION";
    } else if ("文本框" == type) {
        return "TEXT";
    } else {
        return type;
    }
}

// 转换为jump字典
const translate2JumpDict = function (oldJumpData) {
    let jumpDict = {};
    let len = getJsonLength(oldJumpData);
    for (let i = 0; i < len; i++) {
        jumpDict[oldJumpData[i].optionId] = oldJumpData[i].destId;
    }
    return jumpDict;
}

// 转译是否必须：0代表非必填；1代表必填
const traslateRequired = function (isReq) {
    if (isReq) { //必填
        return '1';
    }
    return '0';
}

// 判断是否为填空类题型
const isText = function (curQst) {
    if ("TEXT" == curQst.sys_type || "DATE" == curQst.sys_type || "MULTIPLE_TEXT" == curQst.sys_type || "MATRIX_TEXT" == curQst.sys_type) {
        return true;
    }
    return false;
}

// 设置最大最小值，如果存在的话
const setMaxAndMinIfExist = function (curQst, range) {
    if("SCALE" == curQst.sys_type) { //量表不设置max和min
        return;
    }
    if (undefined == range || null == range) {
        return;
    }
    curQst.min_oper_num = range.minvalue;
    curQst.max_oper_num = range.maxvalue;
}

// 设置选项维度跳题逻辑，如果存在的话
const setJumpOnOptIfExist = function (curQst, option, jumpDict) {
    let optVal = jumpDict[option.value];
    if (curQst.is_jump && undefined != optVal) {
        option.is_jump = true; // 是否跳题
        option.jump_to = optVal; // 跳到第几题
    }
}

// 获取option的is_text字段值
const getOptionIsText = function (curQst, optName) {
    if ("SINGLE" == curQst.sys_type || "MULTIPLE" == curQst.sys_type) {
        if(optName.endsWith('|underline')) {
            return 1;//return true; //问卷星里竟然是数字1，无填空是返回false
        }
    }
    return curQst.is_text; 
}

// 转译选项
const tanslateOptions = function (optionList, curQst, srcQstData, dataIndexDict, jumpDict) {
    let optArr = new Array();
    let len = getJsonLength(optionList);
    //{"lastDataIndex" : 0, "curQstDataIndex":[]};
    let lastDataIndex = dataIndexDict["lastDataIndex"];
    for (let i = 0; i < len; i++) {
        let option = new Object();
        option.tid = curQst.tid; //题目计数序号-和题目外部一样
        option.title_id = curQst.title_id; // 题目标题id-和题目外部一样
        option.title_type = curQst.title_type; // 和题目外部一样
        option.sys_type = curQst.sys_type; // 和题目外部一样
        option.name = optionList[i].title; // 题目的选项名称
        option.title = curQst.title + option.name; // 改成和问卷星解析一样：题目标题+选项名称
        option.value = (optionList[i].optionId).toString(); //(i+1).toString();
        option.real_value = (optionList[i].optionId).toString(); // 问卷提交对应的值

        option.is_jump = false; // 是否跳题
        option.jump_to = ""; // 跳到第几题
        setJumpOnOptIfExist(curQst, option, jumpDict); //设置选项维度跳题逻辑，如果存在的话

        option.req = curQst.req; // 是否必须 - 和题目外部一样
        option.is_text = getOptionIsText(curQst, option.name); // 是否需要填空 - 默认false
        option.relation = ""; // 关联 - 内部不需要这个字段
        option.min_oper_num = curQst.min_oper_num; // 最小值
        option.max_oper_num = curQst.max_oper_num; // 最大值
        option.rate = 0; // 权重 - 默认0 - 非问卷解析字段
        option.text = ""; // 填空内容 - 默认空字符串 - 非问卷解析字段
        option.is_reverse = false; // 是否反向 - 默认false
        option.options = []; // 选项
        option.children = []; // 针对矩阵or多填
        if ("MULTIPLE" == curQst.sys_type || "SORTED" == curQst.sys_type) {//多选每个选项都要有索引
            option.data_index = lastDataIndex + i; // 数据库索引
            dataIndexDict["curQstDataIndex"].push(lastDataIndex + i);
        } else {
            option.data_index = lastDataIndex; // 数据库索引
        }
        option.is_repeat = false; // 是否去重 - 解析默认false
        optArr.push(option);
    }
    if ("MULTIPLE" == curQst.sys_type || "SORTED" == curQst.sys_type) {
        dataIndexDict["lastDataIndex"] = lastDataIndex + len;
    } else if("DESCRIPTION" == curQst.sys_type) {
        //描述类占位题不生成dataIndexDict值
    } else {
        dataIndexDict["curQstDataIndex"].push(lastDataIndex);
        dataIndexDict["lastDataIndex"] = lastDataIndex + 1;
    }
    return optArr;
}

// 构建填空option
const buildTextOption = function (curQst, dataIndexDict, answerId) {
    let lastDataIndex = dataIndexDict["lastDataIndex"];
    let option = new Object();
    option.tid = curQst.tid; //题目计数序号-和题目外部一样
    option.title_id = curQst.title_id; // 题目标题id-和题目外部一样
    option.title = curQst.title; // 和题目外部一样
    option.title_type = curQst.title_type; // 和题目外部一样
    option.sys_type = curQst.sys_type; // 和题目外部一样
    option.name = ""; // 题目的选项名称
    option.value = "1";
    option.real_value = (answerId).toString(); // 问卷提交对应的值
    option.is_jump = false; // 是否跳题
    option.jump_to = ""; // 跳到第几题
    option.req = curQst.req; // 是否必须 - 和题目外部一样
    option.is_text = curQst.is_text; // 是否需要填空 - 默认false
    option.relation = ""; // 关联 - 内部不需要这个字段
    option.min_oper_num = curQst.min_oper_num; // 最小值
    option.max_oper_num = curQst.max_oper_num; // 最大值
    option.rate = 0; // 权重 - 默认0 - 非问卷解析字段
    option.text = ""; // 填空内容 - 默认空字符串 - 非问卷解析字段
    option.is_reverse = false; // 是否反向 - 默认false
    option.options = []; // 选项
    option.children = []; // 针对矩阵or多填
    option.data_index = lastDataIndex; // 数据库索引
    option.is_repeat = false; // 是否去重 - 解析默认false
    dataIndexDict["curQstDataIndex"].push(lastDataIndex);
    dataIndexDict["lastDataIndex"] = lastDataIndex + 1;
    return option;
}

// 获取矩阵多选的子节点选项
const getChildOptionOnly4MultiMatrix = function (len, curQst, oldData, dataIndexDict) {
    let lastDataIndex = dataIndexDict["lastDataIndex"];
    let optArr = new Array();
    for (let i = 0; i < len; i++) {
        let option = new Object();
        option.tid = curQst.tid; //题目计数序号-和题目外部一样
        option.title_id = curQst.title_id; // 题目标题id-和题目外部一样
        option.title = curQst.title + oldData.srcQstData[4][0][1][i][0]; // 父题目+本title
        option.title_type = curQst.title_type; // 和题目外部一样
        option.sys_type = curQst.sys_type; // 和题目外部一样
        option.name = oldData.srcQstData[4][0][1][i][0]; // 题目的选项名称
        option.value = (i+1).toString();
        option.real_value = (i+1).toString(); // 问卷提交对应的值
        option.is_jump = false; // 是否跳题
        option.jump_to = ""; // 跳到第几题
        option.req = curQst.req; // 是否必须 - 和题目外部一样
        option.is_text = curQst.is_text; // 是否需要填空 - 默认false
        option.relation = ""; // 关联 - 内部不需要这个字段
        option.min_oper_num = 0; // 最小值
        option.max_oper_num = 0; // 最大值
        option.rate = 0; // 权重 - 默认0 - 非问卷解析字段
        option.text = ""; // 填空内容 - 默认空字符串 - 非问卷解析字段
        option.is_reverse = false; // 是否反向 - 默认false
        option.options = []; // 选项
        option.children = []; // 针对矩阵题or多填
        option.data_index = lastDataIndex + i; // 数据库索引
        option.is_repeat = false; // 是否去重 - 解析默认false
        optArr.push(option);
        dataIndexDict["curQstDataIndex"].push(lastDataIndex + i);
    }
    dataIndexDict["lastDataIndex"] = lastDataIndex + len;
    return optArr;
}

// 获取子节点选项（只针对矩阵or多填）
const getChildOption = function (maxNum, curQst, oldData) {
    let optArr = new Array();
    if ("MULTIPLE_TEXT" == curQst.sys_type) { // 多项填空
        let option = new Object();
        option.tid = curQst.tid; //题目计数序号-和题目外部一样
        option.title_id = curQst.title_id; // 题目标题id-和题目外部一样
        option.title = curQst.title; // 父题目
        option.title_type = curQst.title_type; // 和题目外部一样
        option.sys_type = curQst.sys_type; // 和题目外部一样
        option.name = curQst.name; // 题目的选项名称
        option.value = curQst.value.toString();
        option.real_value = (curQst.real_value).toString(); // 问卷提交对应的值
        option.is_jump = false; // 是否跳题
        option.jump_to = ""; // 跳到第几题
        option.req = curQst.req; // 是否必须 - 和题目外部一样
        option.is_text = curQst.is_text; // 是否需要填空 - 默认false
        option.relation = ""; // 关联 - 内部不需要这个字段
        option.min_oper_num = curQst.min_oper_num; // 最小值
        option.max_oper_num = curQst.max_oper_num; // 最大值
        option.rate = 0; // 权重 - 默认0 - 非问卷解析字段
        option.text = ""; // 填空内容 - 默认空字符串 - 非问卷解析字段
        option.is_reverse = false; // 是否反向 - 默认false
        option.options = []; // 选项
        option.children = []; // 针对矩阵题or多填
        option.data_index = curQst.data_index; // 数据库索引
        option.is_repeat = false; // 是否去重 - 解析默认false
        optArr.push(option);
        return optArr;
    }
    if (undefined == maxNum || null == maxNum) {
        return optArr;
    }
    for (let i = 0; i < maxNum; i++) {//矩阵单选，矩阵量表
        let option = new Object();
        option.tid = curQst.tid; //题目计数序号-和题目外部一样
        option.title_id = curQst.title_id; // 题目标题id-和题目外部一样
        option.title = curQst.title + oldData.srcQstData[4][0][1][i][0]; // 父题目+本title
        option.title_type = curQst.title_type; // 和题目外部一样
        option.sys_type = curQst.sys_type; // 和题目外部一样
        option.name = oldData.srcQstData[4][0][1][i][0]; // 题目的选项名称
        option.value = (i+1).toString();
        option.real_value = (i+1).toString();//(oldData.srcQstData[4][0][0]).toString(); // 问卷提交对应的值
        option.is_jump = false; // 是否跳题
        option.jump_to = ""; // 跳到第几题
        option.req = curQst.req; // 是否必须 - 和题目外部一样
        option.is_text = curQst.is_text; // 是否需要填空 - 默认false
        option.relation = ""; // 关联 - 内部不需要这个字段
        option.min_oper_num = 0; // 最小值
        option.max_oper_num = 0; // 最大值
        option.rate = 0; // 权重 - 默认0 - 非问卷解析字段
        option.text = ""; // 填空内容 - 默认空字符串 - 非问卷解析字段
        option.is_reverse = false; // 是否反向 - 默认false
        option.options = []; // 选项
        option.children = []; // 针对矩阵题or多填
        option.data_index = curQst.data_index; // 数据库索引
        option.is_repeat = false; // 是否去重 - 解析默认false
        optArr.push(option);
    }
    return optArr;
}

// 获取子选项（只针对矩阵or多填）
const getChildren = function (oldData, curQst, dataIndexDict) {
    let optionList = oldData.inner;
    let range = oldData.range;
    let childArr = new Array();

    //{"lastDataIndex" : 0, "curQstDataIndex":[]};
    let lastDataIndex = dataIndexDict["lastDataIndex"];
    let len = 0;
    if ("MATRIX" == curQst.sys_type || "MULTIPLE_MATRIX" == curQst.sys_type || "MATRIX_TEXT" == curQst.sys_type) {//矩阵单选，矩阵量表，矩阵多选，矩阵填空
        len = getJsonLength(oldData.srcQstData[4]);
        for (let i = 0; i < len; i++) {
            let curChild = new Object();
            curChild.tid = curQst.tid; //题目计数序号-和题目外部一样
            curChild.title_id = curQst.title_id; // 题目标题id-和题目外部一样
            curChild.title = curQst.title + oldData.srcQstData[4][i][3][0]; //  parent的title + child的name组成一个title
            curChild.title_type = curQst.title_type; // 和题目外部一样
            curChild.sys_type = curQst.sys_type; // 和题目外部一样
            curChild.name = oldData.srcQstData[4][i][3][0]; // 题目的子项名称
            curChild.value = (i+1).toString();
            curChild.real_value = (oldData.srcQstData[4][i][0]).toString(); // 问卷提交对应的值
            curChild.is_jump = false; // 是否跳题
            curChild.jump_to = ""; // 跳到第几题
            curChild.req = curQst.req; // 是否必须 - 和题目外部一样
            curChild.is_text = false; // 是否需要填空 - 默认false
            curChild.relation = ""; // 关联 - 内部不需要这个字段
            curChild.min_oper_num = 0; // 最小值
            curChild.max_oper_num = 0; // 最大值
            setMaxAndMinIfExist(curChild, range);
            curChild.rate = 0; // 权重 - 默认0 - 非问卷解析字段
            curChild.text = ""; // 填空内容 - 默认空字符串 - 非问卷解析字段
            curChild.is_reverse = false; // 是否反向 - 默认false
            if ("MULTIPLE_MATRIX" == curQst.sys_type || "MATRIX_TEXT" == curQst.sys_type) {//矩阵多选or矩阵填空
                curChild.options = getChildOptionOnly4MultiMatrix(getJsonLength(oldData.srcQstData[4][i][1]), curChild, oldData, dataIndexDict); // 选项
                curChild.data_index = dataIndexDict["lastDataIndex"] - 1; // 数据库索引
                // dataIndexDict["curQstDataIndex"].push(dataIndexDict["lastDataIndex"]);
                // dataIndexDict["lastDataIndex"] = dataIndexDict["lastDataIndex"] + 1;
            } else {
                curChild.data_index = dataIndexDict["lastDataIndex"] + i; // 数据库索引
                dataIndexDict["curQstDataIndex"].push(dataIndexDict["lastDataIndex"] + i);
                curChild.options = getChildOption(getJsonLength(oldData.srcQstData[4][i][1]), curChild, oldData); // 选项
            }
            curChild.children = []; // 针对矩阵or多填题
            curChild.is_repeat = false; // 是否去重 - 解析默认false
            childArr.push(curChild);
        }
        if ("MULTIPLE_MATRIX" != curQst.sys_type && "MATRIX_TEXT" != curQst.sys_type) {//不是矩阵多选和矩阵填空
            dataIndexDict["lastDataIndex"] = dataIndexDict["lastDataIndex"] + len;
        }
    } else {
        len = getJsonLength(optionList);
        for (let i = 0; i < len; i++) {
            let curChild = new Object();
            curChild.tid = curQst.tid; //题目计数序号-和题目外部一样
            curChild.title_id = curQst.title_id; // 题目标题id-和题目外部一样
            curChild.title = curQst.title + optionList[i].title == undefined ? "" : optionList[i].title; //  parent的title + child的name组成一个title
            curChild.title_type = curQst.title_type; // 和题目外部一样
            curChild.sys_type = curQst.sys_type; // 和题目外部一样
            curChild.name = optionList[i].title.split("_")[1]; // 题目的选项名称
            curChild.value = (i+1).toString();
            curChild.real_value = optionList[i].optionId; // 问卷提交对应的值
            curChild.is_jump = false; // 是否跳题
            curChild.jump_to = ""; // 跳到第几题
            curChild.req = curQst.req; // 是否必须 - 和题目外部一样
            curChild.is_text = curQst.is_text; // 是否需要填空 - 默认false
            curChild.relation = ""; // 关联 - 内部不需要这个字段
            curChild.min_oper_num = 0; // 最小值
            curChild.max_oper_num = 0; // 最大值
            setMaxAndMinIfExist(curChild, range);
            curChild.rate = 0; // 权重 - 默认0 - 非问卷解析字段
            curChild.text = ""; // 填空内容 - 默认空字符串 - 非问卷解析字段
            curChild.is_reverse = false; // 是否反向 - 默认false
            curChild.data_index = dataIndexDict["lastDataIndex"] + i; // 数据库索引
            curChild.options = getChildOption((range == undefined || range == null) ? null : range.maxvalue, curChild, oldData); // 选项
            curChild.children = []; // 针对矩阵or多填题
            curChild.is_repeat = false; // 是否去重 - 解析默认false
            childArr.push(curChild);
            dataIndexDict["curQstDataIndex"].push(dataIndexDict["lastDataIndex"] + i);
        }
        dataIndexDict["lastDataIndex"] = dataIndexDict["lastDataIndex"] + len;
    }
    return childArr;
}

// 获取data_index数据中的多选选项
const getDataIdxCheckboxOption = function (curQst, dataIndexDict, idx) {
    let lastDataIndex = dataIndexDict["lastDataIndex"];
    let option = new Object();
    option.tid = curQst.tid; //题目计数序号-和题目外部一样
    option.title_id = curQst.title_id; // 题目标题id-和题目外部一样
    option.title = curQst.title; // 和题目外部一样
    option.title_type = curQst.title_type; // 和题目外部一样
    option.sys_type = curQst.sys_type; // 和题目外部一样
    option.name = curQst.name; // 题目的选项名称
    option.value = idx+1;
    option.real_value = curQst.value; // 问卷提交对应的值
    option.is_jump = false; // 是否跳题
    option.jump_to = ""; // 跳到第几题
    option.req = curQst.req; // 是否必须 - 和题目外部一样
    option.is_text = curQst.is_text; // 是否需要填空 - 默认false
    option.relation = ""; // 关联 - 内部不需要这个字段
    option.min_oper_num = curQst.min_oper_num; // 最小值
    option.max_oper_num = curQst.max_oper_num; // 最大值
    option.rate = 0; // 权重 - 默认0 - 非问卷解析字段
    option.text = ""; // 填空内容 - 默认空字符串 - 非问卷解析字段
    option.is_reverse = false; // 是否反向 - 默认false
    option.options = []; // 选项
    option.children = []; // 针对矩阵or多填
    option.data_index = lastDataIndex; // 数据库索引
    option.is_repeat = false; // 是否去重 - 解析默认false
    dataIndexDict["curQstDataIndex"].push(lastDataIndex);
    dataIndexDict["lastDataIndex"] = lastDataIndex + 1;
    return option;
}

// 获取选项option的值列表
const getOptionsValueList = function (options) {
    let valueList = new Array();
    for (let i = 0; i < options.length; i++) {
        valueList.push(options[i].value);
    }
    return valueList;
}

// 获取选项option的范围值列表
const getOptionsRangeValueList = function (curData) {
    let valueList = new Array();
    let minVal = curData.min_oper_num;
    let maxVal = curData.max_oper_num;
    for (let i = minVal; i <= maxVal; i++) {
        valueList.push(i);
    }
    return valueList;
}

// 增加valid_values字段
const addValidValues = function (dataIndexArr) {
    let len = getJsonLength(dataIndexArr);
    let sortedQstList = new Array();// 排序题列表，由于其值分散需要收集到一起
    let sortedQstValueList = [-3, -2]; // 排序题值列表
    // 根据每道题的类型添加valid_values字段
    for (let i = 0; i < len; i++) {
        let curData = dataIndexArr[i];
        if ("SINGLE" == curData.sys_type) {// 单选题
            curData.valid_values = [-3].concat(getOptionsValueList(curData.options));
        } else if ("MULTIPLE" == curData.sys_type) {// 多选题
            curData.valid_values = [-3, -2, 0, 1];
        } else if ("SINGLE_SELECT" == curData.sys_type) {// 下拉选择
            curData.valid_values = [-3, -2].concat(getOptionsValueList(curData.options));
        } else if ("SORTED" == curData.sys_type) {// 排序题
            sortedQstList.push(curData);
            sortedQstValueList = sortedQstValueList.concat(getOptionsValueList(curData.options));
        } else if ("SCALE" == curData.sys_type) {// 量表题
            curData.valid_values = [-3].concat(getOptionsValueList(curData.options));
        } else if ("MATRIX" == curData.sys_type) {// 矩阵单选
            curData.valid_values = [-3].concat(getOptionsValueList(curData.options));
        } else if ("MULTIPLE_MATRIX" == curData.sys_type) {// 矩阵多选
            curData.valid_values = [-3, -2, 0, 1];
        } else if ("SINGLE_SLIDE" == curData.sys_type) {// 单项滑动题
            curData.valid_values = getOptionsRangeValueList(curData).concat([-3]);
        } else if ("SLIDE" == curData.sys_type) {// 矩阵滑动题
            curData.valid_values = getOptionsRangeValueList(curData).concat([-3]);
        } else if ("RATE" == curData.sys_type) {// 比重题
            curData.valid_values = getOptionsRangeValueList(curData).concat([-3]);
        } else if ("DATE" == curData.sys_type) {// 日期题
            curData.valid_values = null;
        } else if ("AREA" == curData.sys_type) {// 地区题
            curData.valid_values = null;
        } else if ("TEXT" == curData.sys_type) {// 填空题
            curData.valid_values = null;
        } else if ("MULTIPLE_TEXT" == curData.sys_type) {// 多项填空
            curData.valid_values = null;
        } else if ("MATRIX_TEXT" == curData.sys_type) {// 矩阵填空
            curData.valid_values = null;
        } else {// DESCRIPTION描述类占位题
            curData.valid_values = null;
        }
    }
    // 处理排序题的valid_values字段
    for (let i = 0; i < sortedQstList.length; i++) {
        let curData = sortedQstList[i];
        curData.valid_values = sortedQstValueList;
    }
}

// 获取data_index数据
const getDataIndexArr = function (result) {
    let dataIndexArr = new Array(); // 数据库对应的数据

    let counter = 0;
    let dataArr = result.data; // new Array();//
    let len = getJsonLength(dataArr);
    let dataIndexDict = { "lastDataIndex": 0, "curQstDataIndex": [] };//用于记录上一个索引，和当前题目data_index集合
    for (let i = 0; i < len; i++) {
        //console.log(key);
        // if ("多选" == dataArr[i].type) {
        //     let optionList = dataArr[i].inner;
        //     let len = getJsonLength(optionList);
        //     for (let j = 0; j < len; j++) {
        //         let curData = dataArr[i];
        //         let tmp = new Object();
        //         tmp.tid = curData.id; // 题目的计数序号，唯一但不用于提交，可在relation中使用
        //         tmp.title_id = curData.qid; // 题目id_每个问卷每个题目唯一标识，提交用
        //         tmp.title = tmp.title_id + curData.title; // 题目的标题，title_id + 标题字符串
        //         tmp.title_type = curData.srcType; // 题目类型_每个平台自己的题目类型_1_23
        //         tmp.sys_type = traslateType(curData.type, curData.srcType); // 内部平台题目类型
        //         tmp.name = tmp.title; // 题目名称，同title
        //         tmp.value = ""; // 值 - 题目维度下不需要填
        //         tmp.is_jump = curData.hasJump; // 是否是跳题 "1" || True | ""
        //         tmp.jump_to = null == curData.jumpData ? "" : curData.jumpData; // 跳到哪个题目 "" / title_id
        //         tmp.req = traslateRequired(curData.isRequired); // 是否必须题 "1" / "0" || ""
        //         tmp.is_text = isText(tmp); // 是否填空题 bool
        //         tmp.relation = curData.relation;
        //         tmp.min_oper_num = 0; // 最小值
        //         tmp.max_oper_num = 0; // 最大值
        //         setMaxAndMinIfExist(tmp, curData.range);
        //         tmp.rate = 0; // 权重 - 题目维度下不需要填
        //         tmp.text = ""; // 填空内容 - 题目维度下不需要填
        //         tmp.is_reverse = false; //是否反转 - 题目维度下不需要填
        //         tmp.options = [getDataIdxCheckboxOption(tmp, dataIndexDict, j)];
        //         tmp.children = [];
        //         tmp.data_index = dataIndexDict["curQstDataIndex"]; // 数据库索引
        //         dataIndexDict["curQstDataIndex"] = [];

        //         dataIndexArr.push(tmp);
        //     }
        // } else {
        let jumpDict = {};
        let curData = dataArr[i];
        let tmp = new Object();
        tmp.tid = curData.id; // 题目的计数序号，唯一但不用于提交，可在relation中使用
        tmp.page_id = curData.pageId; // 页码ID，用于提交时标记页码用
        tmp.title_id = curData.qid; // 题目id_每个问卷每个题目唯一标识，提交用
        tmp.title = tmp.title_id + curData.title; // 题目的标题，title_id + 标题字符串
        tmp.title_type = curData.srcType; // 题目类型_每个平台自己的题目类型_1_23
        tmp.sys_type = traslateType(curData.type, curData.srcType); // 内部平台题目类型
        tmp.name = curData.title; // 题目名称，给制单人看的
        tmp.value = ""; // 值 - 题目维度下不需要填
        tmp.is_jump = curData.hasJump; // 是否是跳题 "1" || True | ""
        if (curData.hasJump) {
            jumpDict = translate2JumpDict(curData.jumpData);
        }
        tmp.jump_to = "";//null == curData.jumpData ? "" : curData.jumpData; // 跳到哪个题目 "" / title_id
        tmp.req = traslateRequired(curData.isRequired); // 是否必须题 "1" / "0" || ""
        tmp.is_text = isText(tmp); // 是否填空题 bool
        tmp.relation = curData.relation;
        tmp.min_oper_num = 0; // 最小值
        tmp.max_oper_num = 0; // 最大值
        setMaxAndMinIfExist(tmp, curData.range);
        tmp.rate = 0; // 权重 - 题目维度下不需要填
        tmp.text = ""; // 填空内容 - 题目维度下不需要填
        tmp.is_reverse = false; //是否反转 - 题目维度下不需要填
        tmp.options = [];
        tmp.children = [];
        if ("MATRIX" == tmp.sys_type || "MULTIPLE_MATRIX" == tmp.sys_type || "MATRIX_TEXT" == tmp.sys_type
            || "MULTIPLE_TEXT" == tmp.sys_type || "SLIDE" == tmp.sys_type) { // 矩阵or多填题or滑动条
            tmp.children = getChildren(curData, tmp, dataIndexDict);
        } else if ("TEXT" == tmp.sys_type || "AREA" == tmp.sys_type || "DATE" == tmp.sys_type) { // 填空类题型
            tmp.options.push(buildTextOption(tmp, dataIndexDict, curData.inner[0].optionId));
        } else {
            tmp.options = tanslateOptions(curData.inner, tmp, curData.srcQstData, dataIndexDict, jumpDict); // 选项
        }
        if("DESCRIPTION" != tmp.sys_type) {//描述类占位题不生成dataIndexDict值
            tmp.data_index = dataIndexDict["curQstDataIndex"]; // 数据库索引
        }
        tmp.is_repeat = false; // 是否去重 - 题目维度下不需要填 - 对于解析来说，默认false
        dataIndexDict["curQstDataIndex"] = [];

        if("DESCRIPTION" == tmp.sys_type) {//暂时不处理不显示描述类题型
            continue;
        }
        dataIndexArr.push(tmp);
        // }
    }
    let newDataIndexArr = convertDataIndexArr(dataIndexArr); // 转换data_index数组为wjx格式
    addValidValues(newDataIndexArr); // 增加valid_values字段
    return newDataIndexArr;//dataIndexArr;
}

// 转换data_index数组为wjx格式
const convertDataIndexArr = function (dataIndexArr) {
    let newDataIndexArr = new Array();
    let len = getJsonLength(dataIndexArr);
    counter = 0;
    for (let i = 0; i < len; i++) {
        let curData = dataIndexArr[i];
        if ("MULTIPLE_MATRIX" == curData.sys_type ) {// 矩阵多选：拆children中的options，但option值取原来整体options
            for (let j = 0; j < curData.children.length; j++) {//遍历children
                let child = curData.children[j];
                let options = child.options;
                let optStr = JSON.stringify(options);
                for (let k = 0; k < options.length; k++) {
                    let newTmp = options[k];
                    newTmp.index = counter++;
                    newTmp.options = JSON.parse(optStr);
                    newDataIndexArr.push(newTmp);
                }
            }
        } else if ("MATRIX_TEXT" == curData.sys_type) {// 矩阵填空：拆children中的options
            curData.children.forEach(child => {
                child.options.forEach(option => {                        
                    let newTmp = option;
                    newTmp.index = counter++;
                    newTmp.options = [JSON.parse(JSON.stringify(option))];
                    newDataIndexArr.push(newTmp);
                });                    
            });
        } else if ("SINGLE_SLIDE" == curData.sys_type) {// 单选滑动条：拆options，但title和name取原来整体title和name
            curData.children.forEach(child => {
                let newTmp = child;
                newTmp.title = curData.title;
                newTmp.name = curData.name;
                newTmp.index = counter++;
                newDataIndexArr.push(newTmp);
            });
        } else if ("MATRIX" == curData.sys_type || "MULTIPLE_TEXT" == curData.sys_type || "SLIDE" == curData.sys_type ) { // 矩阵or多填题：拆children
            curData.children.forEach(child => {
                let newTmp = child;
                newTmp.index = counter++;
                newDataIndexArr.push(newTmp);
            });
        } else if ("MULTIPLE" == curData.sys_type || "SORTED" == curData.sys_type || "RATE" == curData.sys_type ) { // 多选，排序和比重题：拆options
            curData.options.forEach(option => {
                let newTmp = option;
                newTmp.index = counter++;
                newTmp.options = [JSON.parse(JSON.stringify(option))];
                newDataIndexArr.push(newTmp);
            });
        } else {
            let newTmp = curData;
            newTmp.index = counter++;
            newDataIndexArr.push(newTmp);
        }
    }
    return newDataIndexArr;
}

// 将指定json数据中的value的值替换成同层real_value的值，并删除real_value
const replaceValueWithRealValue = function (jsonData) {
    if (jsonData == null) {
        return null;
    }
    // 递归遍历 JSON 数据
    const traverse = function (obj) {
        if (typeof obj !== 'object' || obj === null) {
            return;
        }
        for (let key in obj) {
            if (obj.hasOwnProperty(key)) {
                if (key === 'value' && obj.hasOwnProperty('real_value')) {
                    obj[key] = obj['real_value'];
                    delete obj['real_value'];
                } else {
                    traverse(obj[key]);
                }
            }
        }
    };
    traverse(jsonData);
    return jsonData;
};

// 转换为新的结果
const translate2newResult = function (result, resultNew) {
    let listDataArr = new Array(); // 返回的题目内容列表
    let dataArr = result.data; // new Array();//
    let len = getJsonLength(dataArr);
    let dataIndexDict = { "lastDataIndex": 0, "curQstDataIndex": [] };//用于记录上一个索引，和当前题目data_index集合
    for (let i = 0; i < len; i++) {
        let jumpDict = {};
        let curData = dataArr[i];
        let tmp = new Object();
        tmp.tid = curData.id; // 题目的计数序号，唯一但不用于提交，可在relation中使用
        tmp.page_id = curData.pageId; // 页码ID，用于提交时标记页码用
        tmp.title_id = curData.qid; // 题目id_每个问卷每个题目唯一标识，提交用
        tmp.title = tmp.title_id + curData.title; // 题目的标题，title_id + 标题字符串
        tmp.title_type = curData.srcType; // 题目类型_每个平台自己的题目类型_1_23
        tmp.sys_type = traslateType(curData.type, curData.srcType); // 内部平台题目类型
        tmp.name = curData.title; // 题目名称，给制单人看的
        tmp.value = ""; // 值 - 题目维度下不需要填
        tmp.is_jump = curData.hasJump; // 是否是跳题 "1" || True | ""
        if (curData.hasJump) {
            jumpDict = translate2JumpDict(curData.jumpData);
        }
        tmp.jump_to = "";//null == curData.jumpData ? "" : curData.jumpData; // 跳到哪个题目 "" / title_id
        tmp.req = traslateRequired(curData.isRequired); // 是否必须题 "1" / "0" || ""
        tmp.is_text = isText(tmp); // 是否填空题 bool
        tmp.relation = curData.relation;
        tmp.min_oper_num = 0; // 最小值
        tmp.max_oper_num = 0; // 最大值
        setMaxAndMinIfExist(tmp, curData.range);
        tmp.rate = 0; // 权重 - 题目维度下不需要填
        tmp.text = ""; // 填空内容 - 题目维度下不需要填
        tmp.is_reverse = false; //是否反转 - 题目维度下不需要填
        tmp.options = [];
        tmp.children = [];
        if ("MATRIX" == tmp.sys_type || "MULTIPLE_MATRIX" == tmp.sys_type || "MATRIX_TEXT" == tmp.sys_type
            || "MULTIPLE_TEXT" == tmp.sys_type || "SLIDE" == tmp.sys_type) { // 矩阵or多填题or滑动条
            tmp.children = getChildren(curData, tmp, dataIndexDict);
        } else if ("TEXT" == tmp.sys_type || "AREA" == tmp.sys_type || "DATE" == tmp.sys_type) { // 填空类题型
            tmp.options.push(buildTextOption(tmp, dataIndexDict, curData.inner[0].optionId));
        } else {
            tmp.options = tanslateOptions(curData.inner, tmp, curData.srcQstData, dataIndexDict, jumpDict); // 选项
        }
        if("DESCRIPTION" != tmp.sys_type) {//描述类占位题不生成dataIndexDict值
            tmp.data_index = dataIndexDict["curQstDataIndex"]; // 数据库索引
        }
        tmp.is_repeat = false; // 是否去重 - 题目维度下不需要填 - 对于解析来说，默认false
        dataIndexDict["curQstDataIndex"] = [];

        if("DESCRIPTION" == tmp.sys_type) {//暂时不处理不显示描述类题型
            continue;
        }
        listDataArr.push(tmp);
    }
    resultNew.list = replaceValueWithRealValue(listDataArr);//相关分析需要删除real_value才能运行成功
    resultNew.data_index = getDataIndexArr(result);
    resultNew.total_data_index = dataIndexDict["lastDataIndex"];
}


const fs = require('fs');
// const srcData = [null, [null, [[1196037785, "单选题", null, 2, [[472449008, [["单选项 1", null, null, null, 0], ["单选项 2", null, null, null, 0], ["单选项 3", null, null, null, 0]], 0, null, null, null, null, null, 0]], null, null, null, null, null, null, [null, "单选题"]], [530373599, "多选题", null, 4, [[1453282018, [["多选项 1", null, null, null, 0], ["多选项 2", null, null, null, 0], ["多选项 3", null, null, null, 0], ["多选项 4", null, null, null, 0]], 0, null, null, null, null, null, 0]], null, null, null, null, null, null, [null, "多选题"]], [2087397242, "下拉选", null, 3, [[1786550205, [["下拉选项 1", null, null, null, 0], ["下拉选项 2", null, null, null, 0], ["下拉选项 3", null, null, null, 0]], 0, null, null, null, null, null, 0]], null, null, null, null, null, null, [null, "下拉选"]], [2021317363, "上传文件", null, 13, [[1346183939, null, 0]], null, null, null, null, null, null, [null, "上传文件"]], [1001474527, "线性量表", null, 5, [[474859868, [["1"], ["2"], ["3"], ["4"], ["5"]], 0, ["", ""]]], null, null, null, null, null, null, [null, "线性量表"]], [1834162754, "单选题网格", null, 7, [[315383949, [["第 1 列"], ["第 2 列"], ["第 3 列"]], 0, ["第 1 行"], null, null, null, null, null, null, null, [0]], [1818632794, [["第 1 列"], ["第 2 列"], ["第 3 列"]], 0, ["第 2 行"], null, null, null, null, null, null, null, [0]], [392692277, [["第 1 列"], ["第 2 列"], ["第 3 列"]], 0, ["第 3 行"], null, null, null, null, null, null, null, [0]], [417396547, [["第 1 列"], ["第 2 列"], ["第 3 列"]], 0, ["第 4 行"], null, null, null, null, null, null, null, [0]]], null, null, null, null, null, null, [null, "单选题网格"]], [1302312863, "多选网格", null, 7, [[622120515, [["第 1 列"], ["第 2 列"], ["第 3 列"]], 0, ["第 1 行"], null, null, null, null, null, null, null, [1]], [625136363, [["第 1 列"], ["第 2 列"], ["第 3 列"]], 0, ["第 2 行"], null, null, null, null, null, null, null, [1]]], null, null, null, null, null, null, [null, "多选网格"]], [921818864, "日期", null, 9, [[751668336, null, 0, null, null, null, null, [0, 1]]], null, null, null, null, null, null, [null, "日期"]], [1709894049, "时间", null, 10, [[802585509, null, 0, null, null, null, [0]]], null, null, null, null, null, null, [null, "时间"]]], null, null, null, [0, 0], null, null, "古割表单t001", 52, [null, 0, null, 2, 0], null, null, null, null, [2], [[1, 1, 1, 1, 1], 1, 0, 2], null, null, null, null, null, null, null, null, [null, "古割表单t001"]], "/forms", "古割表单t001", null, null, null, "0", null, 0, 0, null, "", 0, "e/1FAIpQLSfTfXmP9PS1BLe0h7ZaV2xCDfcWyQ4uZikyr8hyL_azK8NrrA", 1, "[{\"data\":{\"value\":[]},\"keyPath\":[\"syncMap\",\"applicationFonts\",\"6\"],\"state\":{\"hashValue\":\"00000000\"}},{\"data\":{\"value\":[]},\"keyPath\":[\"syncMap\",\"domainFonts\",\"0\"],\"state\":{\"hashValue\":\"00000000\"}},{\"data\":{\"familyList\":[\"Alegreya\",\"Amatic SC\",\"Bree Serif\",\"Calibri\",\"Cambria\",\"Merriweather\",\"Permanent Marker\",\"Pinyon Script\",\"Playfair Display\",\"Proxima Nova\",\"Roboto\",\"Roboto Mono\",\"Ultra\",\"Varela Round\"],\"recentlyUsedFamilyList\":[],\"transitionedFamilyList\":[],\"hasTransitioned\":true},\"keyPath\":[\"syncMap\",\"preferences\",\"docs-fonts\"],\"state\":{\"timestamp\":1666857657587871}},{\"data\":{\"value\":0},\"keyPath\":[\"syncMap\",\"preferences\",\"collaborator-demo-preference\"],\"state\":{\"timestamp\":1666857657589866}},{\"data\":{\"value\":false},\"keyPath\":[\"syncMap\",\"preferences\",\"docs-mention-dsp\"],\"state\":{\"timestamp\":1666857657593359}},{\"data\":{\"value\":false},\"keyPath\":[\"syncMap\",\"preferences\",\"mae-show_addons_menu_promo\"],\"state\":{\"timestamp\":1666857657595213}},{\"data\":{\"value\":false},\"keyPath\":[\"syncMap\",\"preferences\",\"docs-homescreen-aips\"],\"state\":{\"timestamp\":1666857657596976}},{\"data\":{},\"keyPath\":[\"syncMap\",\"preferences\",\"docs-homescreen-asp\",\"6\"],\"state\":{\"timestamp\":1666857657598787}},{\"data\":{\"value\":0},\"keyPath\":[\"syncMap\",\"preferences\",\"docs-homescreen-ftbdct\"],\"state\":{\"timestamp\":1666857657596976}},{\"data\":{\"value\":false},\"keyPath\":[\"syncMap\",\"preferences\",\"docs-homescreen-dbs\"],\"state\":{\"timestamp\":1666857657596976}},{\"data\":{\"value\":false},\"keyPath\":[\"syncMap\",\"preferences\",\"docs-homescreen-ht\"],\"state\":{\"timestamp\":1666857657596976}},{\"data\":{\"value\":false},\"keyPath\":[\"syncMap\",\"preferences\",\"docs-homescreen-wws\"],\"state\":{\"timestamp\":1666857657596976}},{\"data\":{\"value\":0},\"keyPath\":[\"syncMap\",\"preferences\",\"docs-etg-lvt\"],\"state\":{\"timestamp\":1666857657600507}},{\"data\":{\"value\":false},\"keyPath\":[\"syncMap\",\"preferences\",\"docs-screenreader\"],\"state\":{\"timestamp\":1666857657604491}},{\"data\":{\"value\":false},\"keyPath\":[\"syncMap\",\"preferences\",\"docs-enable_braille\"],\"state\":{\"timestamp\":1666857657604491}},{\"data\":{\"value\":false},\"keyPath\":[\"syncMap\",\"preferences\",\"docs-mute_collaborators\"],\"state\":{\"timestamp\":1666857657604491}},{\"data\":{\"value\":true},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-show_chooser\"],\"state\":{\"timestamp\":1666665025027922}},{\"data\":{\"value\":true},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-show_link_form_promo\"],\"state\":{\"timestamp\":1666665025027922}},{\"data\":{\"value\":true},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-show_whats_new\"],\"state\":{\"timestamp\":1666665025027922}},{\"data\":{\"value\":true},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-expand_dasher_options\"],\"state\":{\"timestamp\":1666665025027922}},{\"data\":{\"proto\":\"[]\"},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-auto_create_sink\"],\"state\":{\"timestamp\":1666857657608544}},{\"data\":{\"proto\":\"[]\"},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-ui_version\"],\"state\":{\"timestamp\":1666857657610333}},{\"data\":{\"value\":false},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-questions_required_by_default\"],\"state\":{\"timestamp\":1666665025027922}},{\"data\":{\"value\":false},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-collect_usernames_by_default\"],\"state\":{\"timestamp\":1666665025027922}},{\"data\":{\"proto\":\"[]\"},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-collect_email_default_choice\"],\"state\":{\"timestamp\":1666857657611949}},{\"data\":{\"value\":0},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-default_point_value\"],\"state\":{\"timestamp\":1666665025027922}},{\"data\":{\"value\":true},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-show_assessments_guided_help\"],\"state\":{\"timestamp\":1666665025027922}},{\"data\":{\"value\":true},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-show_qxq_guided_help\"],\"state\":{\"timestamp\":1666665025027922}},{\"data\":{\"value\":false},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-show_braveheart_guided_help\"],\"state\":{\"timestamp\":1666665025027922}},{\"data\":{\"value\":true},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-show_manual_grading_guided_help\"],\"state\":{\"timestamp\":1666665025027922}},{\"data\":{\"value\":true},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-show_record_view_guided_help\"],\"state\":{\"timestamp\":1666665025027922}},{\"data\":{\"value\":true},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-show_brain_guided_help\"],\"state\":{\"timestamp\":1666665025027922}},{\"data\":{\"value\":false},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-has_seen_braveheart_theme_warning\"],\"state\":{\"timestamp\":1666665025027922}},{\"data\":{\"value\":false},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-show_custom_themes_toast\"],\"state\":{\"timestamp\":1666665025027922}},{\"data\":{\"value\":false},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-show_edu_bundle_18_toast\"],\"state\":{\"timestamp\":1666665025027922}},{\"data\":{\"value\":true},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-show_quizzes_intro\"],\"state\":{\"timestamp\":1666665025027922}},{\"data\":{\"value\":false},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-show_question_import_guided_help\"],\"state\":{\"timestamp\":1666665025027922}},{\"data\":{\"value\":true},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-show_locked_mode_guided_help\"],\"state\":{\"timestamp\":1666665025027922}},{\"data\":{\"value\":false},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-show_draft_responses_modal\"],\"state\":{\"timestamp\":1666665025027922}},{\"data\":{\"value\":false},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-expanded_fonts_guided_help\"],\"state\":{\"timestamp\":1666665025027922}}]", 1, 0];
// const srcData = [null, [null, [[1048929910, "单选", null, 2, [[1651517743, [["单选项 1", null, 136470382, null, 0], ["单选项 2", null, -2, null, 0], ["", null, -2, null, 1]], 1, null, null, null, null, null, 0]], null, null, null, null, null, null, [null, "单选"]], [1649256621, "简短回答题", null, 0, [[1430971206, null, 0]], null, null, null, null, null, null, [null, "简短回答题"]], [370797065, "无标题小节2", "小节说明2", 8, null, null, null, null, null, null, null, [null, "无标题小节2"], [null, "小节说明2"]], [940054143, "段落题", null, 1, [[1100544656, null, 0]], null, null, null, null, null, null, [null, "段落题"]], [136470382, "无标题小节3", "小节说明3", 8, null, null, null, null, null, null, null, [null, "无标题小节3"], [null, "小节说明3\u003cbr\u003e"]], [1485825468, "多选题", null, 4, [[556934755, [["多选项 1", null, null, null, 0], ["多选项 2", null, null, null, 0], ["多选项 3", null, null, null, 0]], 0, null, [[7, 204, ["2"], " 选择2项"]], null, null, null, 0]], null, null, null, null, null, null, [null, "多选题"]], [943066086, "视频", null, 12, null, null, [null, 1, [320, 180, 0], "3nEcRaktWp0"], null, null, null, null, [null, "视频"]], [617603133, "图片", null, 11, null, null, ["1E6Ffi3Fqs-S_nsSm4g8pvvpz91lMDOV5MYc6fuKCpo2OOy8", 0, [1279, 1280, 0]], null, null, null, null, [null, "图片"]], [2021018542, "新添加标题", "新添加说明", 6, null, null, null, null, null, null, null, [null, "新添加标题"], [null, "新添加说明\u003cbr\u003e"]]], null, null, null, [0, 0], null, null, "古割表单t002", 54, [null, null, null, 2, 0], null, null, null, null, [2], null, null, null, null, null, null, null, null, null, [null, "古割表单t002"]], "/forms", "古割表单t002", null, null, null, "", null, 0, 0, null, "", 0, "e/1FAIpQLSe_xiLqvFnnEcWjlXxh7FFBmAu08ALmZHcAOEsNSHdwA8gfEg", 0, "[]", 0, 0];
// const srcData = [null, [null, [[1783077511, "单选", null, 2, [[922308385, [["单选项1", null, null, null, 0], ["单选项2", null, null, null, 0], ["单选项3", null, null, null, 0], ["单选项4", null, null, null, 0]], 0, null, null, null, null, null, 0]], null, null, null, null, null, null, [null, "单选"]], [1878363952, "下拉选", null, 3, [[1575592126, [["下拉选项1", null, null, null, 0], ["下拉选项2", null, null, null, 0], ["下拉选项3", null, null, null, 0]], 0, null, null, null, null, null, 0]], null, null, null, null, null, null, [null, "下拉选\u003cbr\u003e"]]], null, null, null, [0, 0], null, null, "古割表单t003", 52, [null, null, null, 2, 0], null, null, null, null, [2], null, null, null, null, null, null, null, null, null, [null, "古割表单t003"]], "/forms", "古割表单t003", null, null, null, "", null, 0, 0, null, "", 0, "e/1FAIpQLSeEBsepJnjBm1JNqF_3Ji-e599azwMn3YoojQzzsiVyJRMEMg", 0, "[]", 0, 0];//FB_PUBLIC_LOAD_DATA_;
// const srcData = [null, ["古割表单t004", [[564068260, "单选题", null, 2, [[1080780151, [["单选项 1", null, -3, null, 0], ["单选项 2", null, 1323564442, null, 0], ["单选项 3", null, -2, null, 0]], 0, null, null, null, null, null, 0]], null, null, null, null, null, null, [null, "单选题"]], [166621133, "第二小节标题", "第二  小节说明", 8, null, null, null, null, null, null, null, [null, "第二小节标题"], [null, "第二  小节说明"]], [374550515, "多选题", null, 4, [[207032938, [["多选项 1", null, null, null, 0], ["多选项 2", null, null, null, 0]], 0, null, null, null, null, null, 0]], null, null, null, null, null, null, [null, "多选题"]], [1223288214, "第三小节", null, 8, null, null, null, null, null, null, null, [null, "第三小节"]], [1005809761, "简答题", null, 0, [[686996359, null, 0]], null, null, null, null, null, null, [null, "简答题"]], [220103036, "第四小节", null, 8, null, null, null, null, null, null, null, [null, "第四小节"]], [1721115993, "时间题", null, 10, [[780729817, null, 0, null, null, null, [0]]], null, null, null, null, null, null, [null, "时间题"]], [1323564442, "第五小节", null, 8, null, null, null, null, null, null, null, [null, "第五小节"]], [1856852456, "日期题", null, 9, [[349443329, null, 0, null, null, null, null, [0, 1]]], null, null, null, null, null, null, [null, "日期题"]], [1506088660, "第六小节", null, 8, null, null, null, null, null, null, null, [null, "第六小节"]], [202762734, null, null, 2, [[453262243, [["选项 1"]], 0]]], [623845265, "下拉题", null, 3, [[781271295, [["下拉选项 1", null, null, null, 0]], 0, null, null, null, null, null, 0]], null, null, null, null, null, null, [null, "下拉题"]]], null, null, null, [0, 0], null, null, "古割表单t004", 54, [null, null, null, 2, 0], null, null, null, null, [2], null, null, null, null, null, null, null, null, [null, "古割表单t004\u003cbr\u003e"], [null, "古割表单t004"]], "/forms", "古割表单t004", null, null, null, "", null, 0, 0, null, "", 0, "e/1FAIpQLSdR257Un98fbtgN_-CQDtjZCplPIn-ueITKn_MfY8N4MACjvg", 0, "[]", 0, 0];
// const srcData = [null, ["Just a test ", [[449677292, "Age", null, 2, [[749839959, [["Less than 18", null, -3, null, 0], ["18 - 25", null, -2, null, 0], ["26 - 35", null, -2, null, 0], ["36 - 45", null, -2, null, 0], ["More than 45", null, 850283428, null, 0], ["", null, -2, null, 1]], 1, null, null, null, null, null, 0]], null, null, null, null, null, null, [null, "Age"]], [1099965227, "Main Question", null, 8, null, null, null, null, null, null, null, [null, "Main Question"]], [773946036, "Sex?", null, 3, [[1787206028, [["Man", null, null, null, 0], ["Women", null, null, null, 0], ["Others", null, null, null, 0]], 0, null, null, null, null, null, 0]], null, null, null, null, null, null, [null, "Sex?"]], [1808342013, "What things would you like", null, 4, [[169202838, [["Playing Basketball", null, null, null, 0], ["Playing Football", null, null, null, 0], ["Playing Pingpang", null, null, null, 0], ["Playing Tennis", null, null, null, 0], ["Swming", null, null, null, 0], ["Running", null, null, null, 0]], 1, null, [[7, 200, ["2"]]], null, null, null, 0]], null, null, null, null, null, null, [null, "What things would you like"]], [850283428, "Scale", null, 8, null, null, null, null, null, null, null, [null, "Scale"]], [1778064180, "Do you like your Motherland?", null, 5, [[2024199693, [["1"], ["2"], ["3"], ["4"], ["5"]], 1, ["Like", "Unlike"]]], null, null, null, null, null, null, [null, "Do you like your Motherland?"]], [968855174, "Score", null, 7, [[1242549629, [["1"], ["2"], ["3"], ["4"], ["5"]], 1, ["Price"], null, null, null, null, null, null, null, [0]], [2110831536, [["1"], ["2"], ["3"], ["4"], ["5"]], 1, ["Service"], null, null, null, null, null, null, null, [0]], [1520129427, [["1"], ["2"], ["3"], ["4"], ["5"]], 1, ["Function"], null, null, null, null, null, null, null, [0]]], null, null, null, null, null, null, [null, "Score"]], [560291481, "Score2", null, 7, [[341553598, [["1"], ["2"], ["3"], ["4"], ["5"]], 1, ["Price"], null, null, null, null, null, null, null, [1]], [1982753669, [["1"], ["2"], ["3"], ["4"], ["5"]], 1, ["Service"], null, null, null, null, null, null, null, [1]], [1722139912, [["1"], ["2"], ["3"], ["4"], ["5"]], 1, ["Function"], null, null, null, null, null, null, null, [1]]], null, null, null, null, null, null, [null, "Score2"]], [397457049, "After use our productor", null, 1, [[642600482, null, 1]], null, null, null, null, null, null, [null, "After use our productor"]]], null, null, null, [0, 0], null, null, "Test", 54, [null, null, null, 2, 1], null, null, null, null, [2], [[1, 1, 1, 1, 1], 1], null, null, null, null, null, null, null, [null, "Just a test "], [null, "Test"]], "/forms", "Main", null, null, null, "", null, 0, 0, null, "", 0, "e/1FAIpQLSfUNptzkL3BXsEqIXbOUnPIXO2Rs6aeGMSrONTFc6cM7cdtkg", 0, "[]", 0, 0];
// const srcData = [null,["Dear Participant, \n\n          This questionnaire is designed to examine the problems encountered by international students to study in AU classes. We will be capable of comprehending the problems more effectively with the information you provide. Since you are only person who are able to correctly identify how you faced with the problems in AU. Please answer all of the questions honestly and truthfully.\n\n           All of the information collected will be kept in full confidentiality and used only for research. Your data will be anonymized, and we will not perform any analyses or distribute our findings in a way that can be used to determine your identity. We genuinely appreciate your cooperation and time.\n\n           Best Regards\n           ",[[52814035,"Section 1: Demographic Question",null,6,null,null,null,null,null,null,null,[null,"Section 1: Demographic Question"]],[322757820,"1.Are you AU students?",null,2,[[915285173,[["Yes",null,-2,null,0],["No",null,-3,null,0]],1,null,null,null,null,null,0]],null,null,null,null,null,null,[null,"1.Are you AU students?"]],[1946268287,"2.Are you International students(Non -Thai students)?",null,2,[[644607134,[["Yes",null,-2,null,0],["No (If no, the questionnaire will be stop)",null,-3,null,0]],1,null,null,null,null,null,0]],null,null,null,null,null,null,[null,"2.Are you International students(Non -Thai students)?\u003cbr\u003e"]],[1685399028,"3.What's your nationality?",null,2,[[156168646,[["Chinese",null,null,null,0],["Japanese",null,null,null,0],["Indian",null,null,null,0],["Burmese",null,null,null,0],["Cambodian",null,null,null,0],["Malaysian",null,null,null,0],["Vietnamese",null,null,null,0],["",null,null,null,1]],1,null,null,null,null,null,0]],null,null,null,null,null,null,[null,"3.What's your nationality?"]],[1975917042,"4.Which faculty are you in?",null,2,[[1160586804,[["Martin de Tours School of Management and Economics",null,null,null,0],["Theodore Maria School of Arts",null,null,null,0],["Louis Nobiron School of Music",null,null,null,0],["Thomas Aquinas School of Law",null,null,null,0],["Vincent Mary School of Science \u0026 Technology",null,null,null,0],["Albert Laurence School of Communication Arts",null,null,null,0],["Montfort del Rosario School of Architecture and Design",null,null,null,0],["Vincent Mary School of Engineering",null,null,null,0],["Theophane Venard School",null,null,null,0],["Berbadette De Lourdes School of Nursing Science",null,null,null,0]],1,null,null,null,null,null,0]],null,null,null,null,null,null,[null,"4.Which faculty are you in?"]],[823813091,"5. What year are you in?",null,2,[[522467530,[["Freshmen",null,null,null,0],["Sophomore",null,null,null,0],["Junior",null,null,null,0],["Senior",null,null,null,0]],1,null,null,null,null,null,0]],null,null,null,null,null,null,[null,"5. What year are you in?"]],[170736892,"6.What is your current G.P.A.?",null,2,[[162564271,[["0.00-2.00",null,null,null,0],["2.01-2.50",null,null,null,0],["2.51-3.00",null,null,null,0],["3.01-3.50",null,null,null,0],["＞3.50",null,null,null,0]],1,null,null,null,null,null,0]],null,null,null,null,null,null,[null,"6.What is your current G.P.A.?"]],[1651019152,"The Problems Encountering International Students to Study at AU",null,6,null,null,null,null,null,null,null,[null,"The Problems Encountering International Students to Study at AU\u003cbr\u003e"]],[1700298681,"1.To what extent do you agree that the current teaching and learning quality of AU meet your expectations?",null,5,[[404184250,[["1"],["2"],["3"],["4"],["5"]],1,["strongly disagree","strongly agree "]]],null,null,null,null,null,null,[null,"1.To what extent do you agree that the current teaching and learning quality of AU meet your expectations?\u003cbr\u003e"]],[1929712181,"2.Which factors regarding teaching and learning quality affect your motivation? (You can select more than one)",null,4,[[1581787581,[["Professional level of lecturer",null,null,null,0],["Accent of Lecturer",null,null,null,0],["Personality of lecturer",null,null,null,0],["Teaching style \u0026 methods",null,null,null,0],["Use non-English when teaching",null,null,null,0],["Racism",null,null,null,0],["Class atmosphere",null,null,null,0],["Teaching materials quality",null,null,null,0],["Interaction with the lecturer",null,null,null,0],["",null,null,null,1]],1,null,null,null,null,null,0]],null,null,null,null,null,null,[null,"2.Which factors regarding teaching and learning quality affect your motivation? (You can select more than one)"]],[1461814981,"3. To what extent do you agree that the current environment of AU meets your expectations?",null,5,[[534027621,[["1"],["2"],["3"],["4"],["5"]],1,["Strongly disagree ","Strongly agree "]]],null,null,null,null,null,null,[null,"3. To what extent do you agree that the current environment of AU meets your expectations?\u003cbr\u003e"]],[852056426,"4.Which factors regarding environment of AU affect your motivation? (You can select more than one)",null,4,[[1183614402,[["The quality of equipment (e.g. projector, air condition, computer)",null,null,null,0],["Physical comfort (e.g. temperature, lighting, seating)",null,null,null,0],["Classroom organization and layout",null,null,null,0],["Cleanliness and appearance",null,null,null,0],["Technology accessibility",null,null,null,0],["Positive atmosphere",null,null,null,0],["Personality of classmates",null,null,null,0],["",null,null,null,1]],1,null,null,null,null,null,0]],null,null,null,null,null,null,[null,"4.Which factors regarding environment of AU affect your motivation? (You can select more than one)"]],[1810222253,"5.If lecture is a factor that affect your class motivation, which of the following would be factors?(you can select more than one)",null,4,[[1102483528,[["Lecture's Accent",null,null,null,0],["Lecture's  English Level",null,null,null,0],["Lecture's Teaching style",null,null,null,0],["Lecture's Professional Ability",null,null,null,0],["Lecture's Personality",null,null,null,0],["Racism",null,null,null,0],["Friendliness to Students",null,null,null,0],["Use Thai or non-English when teaching",null,null,null,0],["",null,null,null,1]],1,null,null,null,null,null,0]],null,null,null,null,null,null,[null,"5.If lecture is a factor that affect your class motivation, which of the following would be factors?(you can select more than one)"]],[69453386,"6.What personal factors affect your academic performance? (You can select more than one)",null,4,[[886612095,[["Your English level",null,null,null,0],["Did not complete the assignment",null,null,null,0],["Not attending class",null,null,null,0],["Unsuitable for the instructional methods",null,null,null,0],["Lack of learning objectives",null,null,null,0],["Your personality",null,null,null,0],["",null,null,null,1]],1,null,null,null,null,null,0]],null,null,null,null,null,null,[null,"6.What personal factors affect your academic performance? (You can select more than one)"]],[305061986,"7.What personal factors affect your motivation of study? (You can select more than one)",null,4,[[1702800771,[["A different culture than your home country",null,null,null,0],["Food that does not suit your taste",null,null,null,0],["Policy Changes(e.g. visa, entry rules)",null,null,null,0],["Homesickness",null,null,null,0],["Language barrier",null,null,null,0],["Mental health concerns",null,null,null,0],["Financial stress",null,null,null,0],["Your ability and prior knowledge",null,null,null,0],["",null,null,null,1]],1,null,null,null,null,null,0]],null,null,null,null,null,null,[null,"7.What personal factors affect your motivation of study? (You can select more than one)\u003cbr\u003e"]],[2051411094,"8. Overall students workload (assignments, presentations, projects, and etc.)",null,5,[[1984393438,[["1"],["2"],["3"],["4"],["5"]],1,["Strongly disagree","Strongly agree"]]],null,null,null,null,null,null,[null,"8. Overall students workload (assignments, presentations, projects, and etc.)"]],[1873820875,"9. The appropriate level of learning materials",null,5,[[593091742,[["1"],["2"],["3"],["4"],["5"]],0,["Strongly disagree","Strongly agree"]]],null,null,null,null,null,null,[null,"9. The appropriate level of learning materials"]],[205731282,"10. The level of overall quality of academics at AU",null,5,[[1567291907,[["1"],["2"],["3"],["4"],["5"]],1,["Very dissatisfied","Very satisfied "]]],null,null,null,null,null,null,[null,"10. The level of overall quality of academics at AU"]],[1953008930,"The Expectation of International Students from AU Classes",null,6,null,null,null,null,null,null,null,[null,"\u003cspan style\u003d\"white-space:pre-wrap\"\u003eThe Expectation of International Students from AU Classes\u003c/span\u003e"]],[1921107925,"1. What do you expect from AU classes?",null,7,[[1294423358,[["Strongly disagree"],["Disagree"],["Not sure"],["Agree"],["Strongly agree"]],1,["Quality of materialism "],null,null,null,null,null,null,null,[0]],[456885781,[["Strongly disagree"],["Disagree"],["Not sure"],["Agree"],["Strongly agree"]],1,["Excellent and update computer"],null,null,null,null,null,null,null,[0]],[1539064259,[["Strongly disagree"],["Disagree"],["Not sure"],["Agree"],["Strongly agree"]],1,["High teaching quality"],null,null,null,null,null,null,null,[0]],[1228629470,[["Strongly disagree"],["Disagree"],["Not sure"],["Agree"],["Strongly agree"]],1,["Great community"],null,null,null,null,null,null,null,[0]]],null,null,null,null,null,null,[null,"1. What do you expect from AU classes?"]],[868817104,"2. What do you expect from AU facilities?",null,7,[[25205565,[["Strongly disagree"],["disagree"],["Not sure"],["Agree"],["Strongly agree"]],1,["More variety of technology to support learning"],null,null,null,null,null,null,null,[0]],[1138951662,[["Strongly disagree"],["disagree"],["Not sure"],["Agree"],["Strongly agree"]],1,["More provision of peer support and tutoring programs"],null,null,null,null,null,null,null,[0]],[689193443,[["Strongly disagree"],["disagree"],["Not sure"],["Agree"],["Strongly agree"]],1,["Classroom condition (floors, walls, seats, whiteboards, etc.)"],null,null,null,null,null,null,null,[0]],[330353240,[["Strongly disagree"],["disagree"],["Not sure"],["Agree"],["Strongly agree"]],1,["Provision counseling in case students struggling with studies "],null,null,null,null,null,null,null,[0]]],null,null,null,null,null,null,[null,"2. What do you expect from AU facilities?"]],[1248789796,"3. What positive environments should lecturers create in class?(You can select more than one)",null,4,[[1848712012,[["",null,null,null,1],["Lecturer should encourage collaboration",null,null,null,0],["Lecturer should treat all students equally",null,null,null,0],["Lecturer should build good relationships",null,null,null,0],["Lecturer should be open to feedback",null,null,null,0]],1,null,null,null,null,null,1]],null,null,null,null,null,null,[null,"3. What positive environments should lecturers create in class?(You can select more than one)"]],[1962736902,"4. In general, how satisfied are you with the overall quality of social life in AU?",null,5,[[540436529,[["1"],["2"],["3"],["4"],["5"]],1,["Very dissatisfied ","Very satisfied"]]],null,null,null,null,null,null,[null,"4. In general, how satisfied are you with the overall quality of social life in AU?"]],[580943337,"5. Most of your friends and other classmates are with the overall quality of life",null,5,[[1103870756,[["1"],["2"],["3"],["4"],["5"]],1,["Very dissatisfied","Very satisfied "]]],null,null,null,null,null,null,[null,"5. Most of your friends and other classmates are with the overall quality of life"]],[404715127,"6. Satisfaction with the classroom locations",null,5,[[1271573450,[["1"],["2"],["3"],["4"],["5"]],1,["Very dissatisfied ","Very satisfied "]]],null,null,null,null,null,null,[null,"6. Satisfaction with the classroom locations"]],[1595011922,"7. Expectations of lecturer's knowledge of the subject",null,5,[[201535965,[["1"],["2"],["3"],["4"],["5"]],1,["Very dissatisfied ","Very satisfied "]]],null,null,null,null,null,null,[null,"7. Expectations of lecturer's knowledge of the subject"]],[60111362,"8. Expectations of multicultural diversity at AU ",null,5,[[1116455499,[["1"],["2"],["3"],["4"],["5"]],1,["Very dissatisfied ","Very satisfied "]]],null,null,null,null,null,null,[null,"8. Expectations of multicultural diversity at AU "]],[1158130178,"9. Expectations with the international programs offered",null,5,[[2120765174,[["1"],["2"],["3"],["4"],["5"]],1,["Very dissatisfied ","Very satisfied "]]],null,null,null,null,null,null,[null,"9. Expectations with the international programs offered"]],[27132719,"10. Expectations with the quality of the international center department aiding students ",null,5,[[1707101387,[["1"],["2"],["3"],["4"],["5"]],1,["Very dissatisfied ","Very satisfied "]]],null,null,null,null,null,null,[null,"10. Expectations with the quality of the international center department aiding students "]]],null,null,null,[0,0],null,null,"EN4256 Introduction to Business Research Writing (Section 404)",57,[1,null,null,2,0],null,null,null,null,[2],null,null,null,null,null,null,null,null,[null,"Dear Participant, \u003cdiv\u003e\u003cbr\u003e\u003cdiv\u003e          This questionnaire is designed to examine the problems encountered by international students to study in AU classes. We will be capable of comprehending the problems more effectively with the information you provide. Since you are only person who are able to correctly identify how you faced with the problems in AU. Please answer all of the questions honestly and truthfully.\u003c/div\u003e\u003c/div\u003e\u003cdiv\u003e\u003cbr\u003e\u003c/div\u003e\u003cdiv\u003e           All of the information collected will be kept in full confidentiality and used only for research. Your data will be anonymized, and we will not perform any analyses or distribute our findings in a way that can be used to determine your identity. We genuinely appreciate your cooperation and time.\u003c/div\u003e\u003cdiv\u003e\u003cbr\u003e\u003c/div\u003e\u003cdiv\u003e           Best Regards\u003c/div\u003e\u003cdiv\u003e           \u003c/div\u003e"],[null,"EN4256 Introduction to Business Research Writing (Section 404)"]],"/forms","EN4256 Introduction to Business Research Writing(Section 40)",null,null,null,"",null,0,0,null,"",0,"e/1FAIpQLSfObglyt1FRfinXlsbfUrU2jZMSUpybiM7TZ7cGoXz5HkW9Ow",0,"[]",0,0];
// const srcData = [null, [null, [[1196037785, "单选题", "单选说明", 2, [[472449008, [["单选项 1", null, null, null, 0], ["单选项 2", null, null, null, 0], ["单选项 3", null, null, null, 0]], 0, null, null, null, null, null, 0]], null, null, null, null, null, null, [null, "单选题"], [null, "单选说明"]], [530373599, "多选题", null, 4, [[1453282018, [["多选项 1", null, null, null, 0], ["多选项 2", null, null, null, 0], ["多选项 3", null, null, null, 0], ["多选项 4", null, null, null, 0]], 0, null, null, null, null, null, 0]], null, null, null, null, null, null, [null, "多选题"]], [2087397242, "下拉选", null, 3, [[1786550205, [["下拉选项 1", null, null, null, 0], ["下拉选项 2", null, null, null, 0], ["下拉选项 3", null, null, null, 0]], 0, null, null, null, null, null, 0]], null, null, null, null, null, null, [null, "下拉选"]], [2021317363, "上传文件", null, 13, [[1346183939, null, 0]], null, null, null, null, null, null, [null, "上传文件"]], [1001474527, "线性量表", null, 5, [[474859868, [["1"], ["2"], ["3"], ["4"], ["5"]], 0, ["", ""]]], null, null, null, null, null, null, [null, "线性量表"]], [1834162754, "单选题网格", null, 7, [[315383949, [["第 1 列"], ["第 2 列"], ["第 3 列"]], 0, ["第 1 行"], null, null, null, null, null, null, null, [0]], [1818632794, [["第 1 列"], ["第 2 列"], ["第 3 列"]], 0, ["第 2 行"], null, null, null, null, null, null, null, [0]], [392692277, [["第 1 列"], ["第 2 列"], ["第 3 列"]], 0, ["第 3 行"], null, null, null, null, null, null, null, [0]], [417396547, [["第 1 列"], ["第 2 列"], ["第 3 列"]], 0, ["第 4 行"], null, null, null, null, null, null, null, [0]]], null, null, null, [[8, 205]], null, null, [null, "单选题网格"]], [1302312863, "多选网格", null, 7, [[622120515, [["第 1 列"], ["第 2 列"], ["第 3 列"]], 0, ["第 1 行"], null, null, null, null, null, null, null, [1]], [625136363, [["第 1 列"], ["第 2 列"], ["第 3 列"]], 0, ["第 2 行"], null, null, null, null, null, null, null, [1]]], null, null, null, [[8, 205]], null, null, [null, "多选网格"]], [921818864, "日期", null, 9, [[751668336, null, 0, null, null, null, null, [0, 1]]], null, null, null, null, null, null, [null, "日期"]], [1709894049, "时间", null, 10, [[802585509, null, 0, null, null, null, [0]]], null, null, null, null, null, null, [null, "时间"]]], null, null, null, [0, 0], null, null, "古割表单t001", 59, [null, 0, null, 2, 0], null, null, null, null, [2], [[1, 1, 1, 1, 1], 1, 0, 2], null, null, null, null, null, null, null, null, [null, "古割表单t001"]], "/forms", "古割表单t001", null, null, null, "0", null, 0, 0, null, "", 0, "e/1FAIpQLSfTfXmP9PS1BLe0h7ZaV2xCDfcWyQ4uZikyr8hyL_azK8NrrA", 1, "[{\"data\":{\"value\":[]},\"keyPath\":[\"syncMap\",\"applicationFonts\",\"6\"],\"state\":{\"hashValue\":\"00000000\"}},{\"data\":{\"value\":[]},\"keyPath\":[\"syncMap\",\"domainFonts\",\"0\"],\"state\":{\"hashValue\":\"00000000\"}},{\"data\":{\"familyList\":[\"Alegreya\",\"Amatic SC\",\"Bree Serif\",\"Calibri\",\"Cambria\",\"Merriweather\",\"Permanent Marker\",\"Pinyon Script\",\"Playfair Display\",\"Proxima Nova\",\"Roboto\",\"Roboto Mono\",\"Ultra\",\"Varela Round\"],\"recentlyUsedFamilyList\":[],\"transitionedFamilyList\":[],\"hasTransitioned\":true},\"keyPath\":[\"syncMap\",\"preferences\",\"docs-fonts\"],\"state\":{\"timestamp\":1677682727869786}},{\"data\":{\"value\":0},\"keyPath\":[\"syncMap\",\"preferences\",\"collaborator-demo-preference\"],\"state\":{\"timestamp\":1677682727871353}},{\"data\":{\"value\":false},\"keyPath\":[\"syncMap\",\"preferences\",\"docs-mention-dsp\"],\"state\":{\"timestamp\":1677682727878674}},{\"data\":{\"value\":true},\"keyPath\":[\"syncMap\",\"preferences\",\"docs-enable_colon_emoji_insertion\"],\"state\":{\"timestamp\":1677682727878674}},{\"data\":{\"value\":false},\"keyPath\":[\"syncMap\",\"preferences\",\"mae-show_addons_menu_promo\"],\"state\":{\"timestamp\":1677682727880174}},{\"data\":{\"value\":false},\"keyPath\":[\"syncMap\",\"preferences\",\"docs-homescreen-aips\"],\"state\":{\"timestamp\":1677682727881416}},{\"data\":{},\"keyPath\":[\"syncMap\",\"preferences\",\"docs-homescreen-asp\",\"6\"],\"state\":{\"timestamp\":1677682727882828}},{\"data\":{\"value\":0},\"keyPath\":[\"syncMap\",\"preferences\",\"docs-homescreen-ftbdct\"],\"state\":{\"timestamp\":1677682727881416}},{\"data\":{\"value\":false},\"keyPath\":[\"syncMap\",\"preferences\",\"docs-homescreen-dbs\"],\"state\":{\"timestamp\":1677682727881416}},{\"data\":{\"value\":false},\"keyPath\":[\"syncMap\",\"preferences\",\"docs-homescreen-ht\"],\"state\":{\"timestamp\":1677682727881416}},{\"data\":{\"value\":false},\"keyPath\":[\"syncMap\",\"preferences\",\"docs-homescreen-wws\"],\"state\":{\"timestamp\":1677682727881416}},{\"data\":{\"value\":0},\"keyPath\":[\"syncMap\",\"preferences\",\"docs-etg-lvt\"],\"state\":{\"timestamp\":1677682727884855}},{\"data\":{\"value\":false},\"keyPath\":[\"syncMap\",\"preferences\",\"docs-screenreader\"],\"state\":{\"timestamp\":1677682727887823}},{\"data\":{\"value\":false},\"keyPath\":[\"syncMap\",\"preferences\",\"docs-enable_braille\"],\"state\":{\"timestamp\":1677682727887823}},{\"data\":{\"value\":false},\"keyPath\":[\"syncMap\",\"preferences\",\"docs-mute_collaborators\"],\"state\":{\"timestamp\":1677682727887823}},{\"data\":{\"value\":true},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-show_chooser\"],\"state\":{\"timestamp\":1672387448162422}},{\"data\":{\"value\":true},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-show_link_form_promo\"],\"state\":{\"timestamp\":1672387448162422}},{\"data\":{\"value\":true},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-show_whats_new\"],\"state\":{\"timestamp\":1672387448162422}},{\"data\":{\"value\":true},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-expand_dasher_options\"],\"state\":{\"timestamp\":1672387448162422}},{\"data\":{\"proto\":\"[]\"},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-auto_create_sink\"],\"state\":{\"timestamp\":1677682727889817}},{\"data\":{\"proto\":\"[]\"},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-ui_version\"],\"state\":{\"timestamp\":1677682727891240}},{\"data\":{\"value\":false},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-questions_required_by_default\"],\"state\":{\"timestamp\":1672387448162422}},{\"data\":{\"value\":false},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-collect_usernames_by_default\"],\"state\":{\"timestamp\":1672387448162422}},{\"data\":{\"proto\":\"[]\"},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-collect_email_default_choice\"],\"state\":{\"timestamp\":1677682727669595}},{\"data\":{\"value\":0},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-default_point_value\"],\"state\":{\"timestamp\":1672387448162422}},{\"data\":{\"value\":true},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-show_assessments_guided_help\"],\"state\":{\"timestamp\":1672387448162422}},{\"data\":{\"value\":true},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-show_qxq_guided_help\"],\"state\":{\"timestamp\":1672387448162422}},{\"data\":{\"value\":false},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-show_braveheart_guided_help\"],\"state\":{\"timestamp\":1672387448162422}},{\"data\":{\"value\":true},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-show_manual_grading_guided_help\"],\"state\":{\"timestamp\":1672387448162422}},{\"data\":{\"value\":true},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-show_record_view_guided_help\"],\"state\":{\"timestamp\":1672387448162422}},{\"data\":{\"value\":false},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-show_brain_guided_help\"],\"state\":{\"timestamp\":1672387448162422}},{\"data\":{\"value\":false},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-has_seen_braveheart_theme_warning\"],\"state\":{\"timestamp\":1672387448162422}},{\"data\":{\"value\":false},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-show_custom_themes_toast\"],\"state\":{\"timestamp\":1672387448162422}},{\"data\":{\"value\":false},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-show_edu_bundle_18_toast\"],\"state\":{\"timestamp\":1672387448162422}},{\"data\":{\"value\":false},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-show_quizzes_intro\"],\"state\":{\"timestamp\":1672387448162422}},{\"data\":{\"value\":false},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-show_question_import_guided_help\"],\"state\":{\"timestamp\":1672387448162422}},{\"data\":{\"value\":true},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-show_locked_mode_guided_help\"],\"state\":{\"timestamp\":1672387448162422}},{\"data\":{\"value\":false},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-show_draft_responses_modal\"],\"state\":{\"timestamp\":1672387448162422}},{\"data\":{\"value\":false},\"keyPath\":[\"syncMap\",\"preferences\",\"freebird-expanded_fonts_guided_help\"],\"state\":{\"timestamp\":1672387448162422}}]", 1, 0];
// const srcData = [null, [null, [[1746685542, "1、 請問您的年齡為？", null, 2, [[606064323, [["16嵗以下", null, -2, null, 0], ["16-18", null, -2, null, 0], ["18-22", null, -2, null, 0], ["23-25", null, -2, null, 0], ["25-30", null, -2, null, 0], ["30嵗以上", null, -2, null, 0]], 1, null, null, null, null, null, 0]], null, null, null, null, null, null, [null, "\u003cp\u003e1、 請問您的年齡為？\u003c/p\u003e"]], [410683655, "2、請問您的性別為？", null, 2, [[1051788278, [["男性", null, null, null, 0], ["女性", null, null, null, 0], ["其他", null, null, null, 0]], 1, null, null, null, null, null, 0]], null, null, null, null, null, null, [null, "2、請問您的性別為？\u003cbr\u003e"]], [916644772, "3、請問您目前的最高學歷為？", null, 2, [[72499420, [["高中及以下", null, null, null, 0], ["大學", null, null, null, 0], ["研究所", null, null, null, 0], ["博士及以上", null, null, null, 0]], 1, null, null, null, null, null, 0]], null, null, null, null, null, null, [null, "3、\u003cspan\u003e請問您目前的最高學歷為？\u003c/span\u003e"]], [1675507472, "4、 您是否有閲讀漫畫的經歷？", null, 2, [[226669305, [["是", null, -2, null, 0], ["否", null, -3, null, 0]], 1, null, null, null, null, null, 0]], null, null, null, null, null, null, [null, "\u003cp\u003e4、 您是否有閲讀漫畫的經歷？\u003c/p\u003e"]], [461571072, "5、您每月可用於購買漫畫的金額大約爲？", null, 2, [[1900480871, [["100元以下", null, null, null, 0], ["100-500元", null, null, null, 0], ["500-1000元", null, null, null, 0], ["1000元以上", null, null, null, 0]], 1, null, null, null, null, null, 0]], null, null, null, null, null, null, [null, "\u003cp\u003e5、您每月可用於購買漫畫的金額大約爲？\u003c/p\u003e"]], [1373164573, "6、 您每日使用網路的時長約爲？", null, 2, [[1213187697, [["少於1hr", null, null, null, 0], ["1hr-3hr", null, null, null, 0], ["3hr-8hr", null, null, null, 0], ["大於8hr", null, null, null, 0]], 1, null, null, null, null, null, 0]], null, null, null, null, null, null, [null, "\u003cp\u003e6、 您每日使用網路的時長約爲？\u003c/p\u003e"]], [1458530087, "7、您是否有在網路上閲讀連載數位漫畫的習慣？", null, 2, [[38591754, [["是（請填寫8-1）", null, null, null, 0], ["否（請填寫8-2）", null, null, null, 0]], 1, null, null, null, null, null, 0]], null, null, null, null, null, null, [null, "7、\u003cspan\u003e您是否有在網路上閲讀連載數位漫畫的習慣？\u003c/span\u003e"]], [846250871, "8-1、 您閲讀數位漫畫的頻率爲何？", null, 2, [[1527936334, [["每天都閲讀", null, null, null, 0], ["2-3天一次", null, null, null, 0], ["一周一次", null, null, null, 0], ["兩周一次", null, null, null, 0], ["", null, null, null, 1]], 0, null, null, null, null, null, 0]], null, null, null, null, null, null, [null, "8-1、 您閲讀數位漫畫的頻率爲何？"]], [653946576, "8-2、 您不選擇數位漫畫的原因爲何？", null, 2, [[1274856395, [["不習慣數位閲讀方式", null, -3, null, 0], ["沒有相對應的資源", null, -3, null, 0], ["不希望額外付費", null, -3, null, 0], ["有收集紙本漫畫的習慣", null, -3, null, 0], ["", null, -3, null, 1]], 0, null, null, null, null, null, 0]], null, null, null, null, null, null, [null, "8-2、\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n您不選擇數位漫畫的原因爲何？"]], [540497002, "9、您閱讀數位漫畫時通常使用的數位裝置爲何？", null, 4, [[1257260843, [["手機", null, null, null, 0], ["平板", null, null, null, 0], ["電腦", null, null, null, 0], ["電子閲讀器（Kindle、MooInk等）", null, null, null, 0], ["", null, null, null, 1]], 1, null, null, null, null, null, 0]], null, null, null, null, null, null, [null, "9、您閱讀數位漫畫時通常使用的數位裝置爲何？\u003cbr\u003e"]], [503142606, "10、您習慣選擇何種方式追連載漫畫？", null, 4, [[1597828536, [["網路上的中文官方授權平臺", null, null, null, 0], ["作者自己的社群媒體", null, null, null, 0], ["非官方授權平臺", null, null, null, 0], ["", null, null, null, 1]], 1, null, null, null, null, null, 0]], null, null, null, null, null, null, [null, "10、您習慣選擇何種方式追連載漫畫？"]], [308501796, "11、您目前是否有願意長期穩定付費使用的官方授權漫畫平臺？", null, 2, [[1123048227, [["是", null, null, null, 0], ["否", null, null, null, 0]], 1, null, null, null, null, null, 0]], null, null, null, null, null, null, [null, "11、您目前是否有願意長期穩定付費使用的官方授權漫畫平臺？"]], [1108312233, "12、您最容易接受的數位漫畫付費方式爲何？", null, 2, [[310918245, [["電子書店（分冊/節購買）", null, null, null, 0], ["單本租借", null, null, null, 0], ["定額包月", null, null, null, 0], ["", null, null, null, 1]], 1, null, null, null, null, null, 0]], null, null, null, null, null, null, [null, "12、您最容易接受的數位漫畫付費方式爲何？"]], [696638207, "13、 您最常使用的數位漫畫閲讀平臺爲何？", null, 4, [[437695314, [["Amazon", null, null, null, 0], ["Reedmoo", null, null, null, 0], ["博客來", null, null, null, 0], ["BOOK☆WALKER", null, null, null, 0], ["Kobo Rakuten樂天電子書", null, null, null, 0], ["PUBU電子書城", null, null, null, 0], ["東立電子書城", null, null, null, 0], ["Google Play圖書", null, null, null, 0], ["亂搭！租書網", null, null, null, 0], ["Line Webtoon", null, null, null, 0], ["", null, null, null, 1]], 1, null, null, null, null, null, 0]], null, null, null, null, null, null, [null, "\u003cp\u003e13、 您最常使用的數位漫畫閲讀平臺爲何？\u003c/p\u003e"]], [1175073283, "14、您每月用於購買數位漫畫的平均花費大約為何？", null, 2, [[773716188, [["100元以下", null, null, null, 0], ["100-500元", null, null, null, 0], ["500-1000元", null, null, null, 0], ["1000元以上", null, null, null, 0]], 1, null, null, null, null, null, 0]], null, null, null, null, null, null, [null, "14、您每月用於購買數位漫畫的平均花費大約為何？"]], [197221298, "15、您是否使用過非官方授權的漫畫平臺", null, 2, [[1628440700, [["是", null, null, null, 0], ["否", null, null, null, 0]], 1, null, null, null, null, null, 0]], null, null, null, null, null, null, [null, "15、您是否使用過非官方授權的漫畫平臺"]], [597132809, "16、請問您使用非官方授權的漫畫平臺主要原因爲何？", null, 4, [[500856041, [["您在追的漫畫無官方中文授權", null, null, null, 0], ["官方平臺更新速度不如預期", null, null, null, 0], ["想使用免費平臺節省開支", null, null, null, 0], ["官方平臺資源過於分散，需要訂閲多平臺會員", null, null, null, 0], ["非官方授權平臺是最方便取得的管道", null, null, null, 0], ["", null, null, null, 1]], 1, null, null, null, null, null, 0]], null, null, null, null, null, null, [null, "16、請問您使用非官方授權的漫畫平臺主要原因爲何？"]], [1729771573, "17、如果有符合您預期的正版授權漫畫平臺，您會願意付費嗎？", null, 2, [[1895326339, [["會", null, null, null, 0], ["不會", null, null, null, 0]], 1, null, null, null, null, null, 0]], null, null, null, null, null, null, [null, "17、如果有符合您預期的正版授權漫畫平臺，您會願意付費嗎？"]], [1396740730, "18、何種正版漫畫平臺會使您願意長期付費訂閲或購買？", null, 4, [[1906792498, [["及時更新連載漫畫（不分國内外）", null, null, null, 0], ["熱門漫畫版權資源整合齊全", null, null, null, 0], ["有提供小衆、冷門、絕版漫畫資源", null, null, null, 0], ["高分辨率和良好的中文翻譯", null, null, null, 0], ["網站UI設計好，美觀易用", null, null, null, 0], ["附帶讀者交流社群或購買評價機制", null, null, null, 0], ["提供分章節的購買或訂閲模式", null, null, null, 0], ["跨平臺互通良好，可在不同設備上無縫銜接閲讀記錄", null, null, null, 0], ["提供分享功能，可分享指定段落至社群平臺或通訊軟體", null, null, null, 0], ["", null, null, null, 1]], 1, null, null, null, null, null, 0]], null, null, null, null, null, null, [null, "18、何種正版漫畫平臺會使您願意長期付費訂閲或購買？"]], [1917145098, "19、 您認爲閲讀付費數位漫畫是否會影響您購買紙本漫畫的意願？", null, 2, [[1700433563, [["是", null, null, null, 0], ["否", null, null, null, 0]], 1, null, null, null, null, null, 0]], null, null, null, null, null, null, [null, "19、\u003cspan\u003e \u003c/span\u003e\u003cspan\u003e您認爲閲讀\u003cb\u003e付費\u003c/b\u003e數位漫畫是否會影響您購買紙本漫畫的意願？\u003c/span\u003e"]], [824284485, "20、 您認爲閲讀免費數位漫畫是否會影響您購買紙本漫畫的意願？", null, 2, [[104665996, [["是", null, null, null, 0], ["否", null, null, null, 0]], 1, null, null, null, null, null, 0]], null, null, null, null, null, null, [null, "20、 您認爲閲讀\u003cb\u003e免費\u003c/b\u003e數位漫畫是否會影響您購買紙本漫畫的意願？\u003cbr\u003e"]]], ["我们已收到您的回答", 1, 0, 0, 0], null, [null, null, null, null, null, [null, null, null, [96, 125, 139, null, 2], [231, 236, 238, null, 1], null, [["Roboto", 24, 400, 2], ["Roboto", 12, 400, 2], ["Roboto", 11, 400, 2]]]], [0, 0], null, null, "台灣年輕讀者使用電子漫畫服務的影響因素調查", 59, [1, null, null, 2, 0, null, 1], null, null, null, null, [2], null, null, null, null, null, null, null, null, null, [null, "台灣年輕讀者使用電子漫畫服務的影響因素調查"]], "/forms", "未命名的表单", null, null, null, "", null, 0, 0, null, "", 0, "e/1FAIpQLSeWmS3NwbzNehqDIRFuadgHGH-FqshrjOg3EkhXMhh54gMOzg", 0, "[]", 0, 0];
// const srcData = [null, [null, [[500254481, "单选题", null, 2, [[1041616889, [["单选项1", null, null, null, 0], ["单选项2", null, null, null, 0], ["单选项3", null, null, null, 0]], 1, null, null, null, null, null, 0]], null, null, null, null, null, null, [null, "单选题"]], [383838454, "多选题", null, 4, [[1397809770, [["多选项1", null, null, null, 0], ["多选项2", null, null, null, 0], ["多选项3", null, null, null, 0], ["多选项4", null, null, null, 0]], 0, null, null, null, null, null, 0]], null, null, null, null, null, null, [null, "多选题"]], [1000242251, "下拉题", null, 3, [[1343972306, [["下拉选项1", null, null, null, 0], ["下拉选项2", null, null, null, 0]], 0, null, null, null, null, null, 0]], null, null, null, null, null, null, [null, "下拉题"]], [1773486349, "量表题", null, 5, [[1224417829, [["1"], ["2"], ["3"], ["4"], ["5"]], 0, ["很不满意", "很满意"]]], null, null, null, null, null, null, [null, "量表题"]], [1178004959, "请输入你的出生日期", null, 9, [[2033375724, null, 0, null, null, null, null, [0, 1]]], null, null, null, null, null, null, [null, "请输入你的出生日期"]], [246773592, "单项填空", null, 0, [[2010275003, null, 0]], null, null, null, null, null, null, [null, "单项填空"]], [1472572747, "矩阵单选", null, 7, [[284073369, [["第 1 列"], ["第 2 列"], ["第 3 列"], ["第 4 列"], ["第 5 列"]], 0, ["第 1 行"], null, null, null, null, null, null, null, [0]], [57368770, [["第 1 列"], ["第 2 列"], ["第 3 列"], ["第 4 列"], ["第 5 列"]], 0, ["第 2 行"], null, null, null, null, null, null, null, [0]]], null, null, null, null, null, null, [null, "矩阵单选"]], [1186586064, "矩阵多选", null, 7, [[1892436430, [["第 1 列"], ["第 2 列"], ["第 3 列"], ["第 4 列"]], 0, ["第 1 行"], null, null, null, null, null, null, null, [1]], [1184361657, [["第 1 列"], ["第 2 列"], ["第 3 列"], ["第 4 列"]], 0, ["第 2 行"], null, null, null, null, null, null, null, [1]], [1495404203, [["第 1 列"], ["第 2 列"], ["第 3 列"], ["第 4 列"]], 0, ["第 3 行"], null, null, null, null, null, null, null, [1]]], null, null, null, null, null, null, [null, "矩阵多选"]]], null, null, null, null, null, null, "t004_对标wenjuanxing", 66, [null, null, null, 2, 0, null, 1], null, null, null, null, [2], null, null, null, null, null, null, null, null, null, [null, "t004_对标wenjuanxing"]], "/forms", "未命名的表单", null, null, null, "", null, 0, 0, null, "", 0, "e/1FAIpQLScxILnzWzPaJ-yjBd1-P2yOmS-t5T200mNDPzCyUhyZkcor8g", 0, "[]", 0, 0];
// const srcData = [null,[null,[[1965372708,"单选ti",null,2,[[260758619,[["单选项1",null,-2,null,0],["单选项2",null,763187707,null,0],["单选项3",null,1182373132,null,0],["单选项4",null,-2,null,0]],0,null,null,null,null,null,0]],null,null,null,null,null,null,[null,"单选ti"]],[864349915,"多选ti",null,4,[[621399736,[["duo选项1",null,null,null,0],["duo选项2",null,null,null,0]],0,null,null,null,null,null,0]],null,null,null,null,null,null,[null,"多选ti\u003cbr\u003e"]],[763187707,"无标题小节-第2节","说明（可选）",8,null,null,null,null,null,null,null,[null,"无标题小节-第2节"],[null,"说明（可选）"]],[586542936,"第二ge单选题",null,2,[[1250236407,[["dan选项1",null,null,null,0],["dan选项2",null,null,null,0]],0,null,null,null,null,null,0]],null,null,null,null,null,null,[null,"第二ge单选题\u003cbr\u003e"]],[277789281,"下拉ti",null,3,[[1054247922,[["下拉选项1",null,null,null,0],["下拉选项2",null,null,null,0]],0,null,null,null,null,null,0]],null,null,null,null,null,null,[null,"下拉ti\u003cbr\u003e"]],[1024011805,"填空题",null,0,[[912858493,null,0]],null,null,null,null,null,null,[null,"填空题"]],[1182373132,"无标题小节-第3节",null,8,null,null,null,null,null,null,null,[null,"无标题小节-第3节"]],[796305854,"第3个单选题",null,2,[[1058270633,[["third单选项1",null,null,null,0],["third单选项2",null,null,null,0]],0,null,null,null,null,null,0]],null,null,null,null,null,null,[null,"第3个单选题\u003cbr\u003e"]]],null,null,null,null,null,null,"t003_logic",66,[null,null,null,2,0,null,1],null,null,null,null,[2],null,null,null,null,null,null,null,null,null,[null,"t003_logic"]],"/forms","未命名的表单",null,null,null,"",null,0,0,null,"",0,"e/1FAIpQLSegvgie9WAgz0unT88ZTrfKgUqGja5GNYzOhFUkSEnMK1W8Uw",0,"[]",0,0];
// const srcData = FB_PUBLIC_LOAD_DATA_;
//加载题目主体函数定义
const getDataArr = function (sdata_file) {
    // console.log("==================================== enter js ====================================");
    let sdata = "";
    try {
        const data = fs.readFileSync(sdata_file);
        // console.log(data.toString());
        sdata = data.toString();
    } catch (err) {
        console.error(err);
    }
    let srcData = str2json(sdata);
    let resultNew = { list: [], data_index: [], total_data_index: 0 };//list代表问卷的所有题目；data_index代表数据库对应的数据；

    var result = { title: '', error: '', data: [] };//error内容为加载失败消息：如问卷暂停、需微信登录等
    let dataArray = new Array(); // 返回的题目内容列表
    let counter = 0;

    // console.log(FB_PUBLIC_LOAD_DATA_);
    let qstArr = srcData[1][1];
    let qstLength = qstArr.length;
    let pageCounter = 0;
    for (let i = 0; i < qstLength; i++) {
        let tmp = new Object();
        tmp.srcType = qstArr[i][3]; //题目原始类型
        if (8 == tmp.srcType) {
            pageCounter++;
        }
        tmp.pageId = pageCounter; // 页码ID
        tmp.id = ++counter; // 全局题号 ，从1开始递增。 
        tmp.qid = qstArr[i][0];// 题目id（提交使用的ID）。
        tmp.title = qstArr[i][1]; // 题目标题，需要避免使用特殊字符“_”

        tmp.type = getType(qstArr[i][3], qstArr[i][4]);  // 见typeName 定义 返回字符串
        tmp.isRequired = false; // 是否必选。
        tmp.hasJump = false;
        tmp.inner = [];
        tmp.jumpData = null;

        if ('占位题' != tmp.type) {
            tmp.inner = getOption(tmp.type, qstArr[i][4], tmp.title); // 选项数据。 见选项数据定义
            tmp.isRequired = getRequired(qstArr[i][4][0][2]);// 是否必选。

            let answerId = qstArr[i][4][0][0];
            setJumpIfExist(tmp, qstArr[i][4][0][1], answerId);
        }
        tmp.range = null;
        tmp.relation = ''; //赋值关联项;见关联字符串定义(显示逻辑)
        if ("多选" == tmp.type) {
            tmp.range = getRangeIfExist(qstArr[i][4][0]);
        }

        // 对矩阵每列限制一条的处理：标题添加前缀“每列限一条_”
        if ("矩阵单选" == tmp.type || "矩阵多选" == tmp.type) {
            if (null != qstArr[i][8] && 8 == qstArr[i][8][0][0] && 205 == qstArr[i][8][0][1]) {
                tmp.title = "每列限一条_" + tmp.title;
            }
        }
        tmp.srcQstData = qstArr[i];

        dataArray.push(tmp);
    }

    //添加收集电子邮件地址（如果存在的话）
    // var tmpHtml = document.getElementsByClassName('geS5n AgroKb oQYVNd')[0];
    // // console.log(tmpHtml);
    // if (undefined !== tmpHtml && null !== tmpHtml) {
    //     var emailTag = document.getElementsByClassName('geS5n AgroKb oQYVNd')[0].getElementsByTagName('input')[0];
    //     // console.log(emailTag);
    //     if (undefined !== emailTag && null !== emailTag) {
    //         addCollectEmail(dataArray, String(emailTag.outerHTML), ++counter);
    //     }
    // }

    result.title = srcData[1][8];
    result.data = dataArray;

    translate2newResult(result, resultNew);
    return resultNew; // return result; //  
};

// getDataArr(param1);//测试结果
console.log(JSON.stringify(getDataArr(param1)));//测试输出结果
